[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pre
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk |
Date: |
Mon, 10 Jun 2019 15:51:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 10/06/19 15:34, Zhengui li wrote:
>
> when do qmp sush as drive_add, qemu main thread locks the
> qemu_global_mutex and do pread in raw_probe_alignmen. Pread is a
> synchronous operation. If backend storage network has a large delay
> or IO pressure is too large, the pread operation will not return for
> a long time, which make vcpu thread can't acquire qemu_global_mutex
> for a long time and make the vcpu thread unable to be scheduled for a
> long time. So virtual machine cpu soft lockup happened.
>
> qemu main thread should not hold qemu_global_mutex for a long time
> when do qmp that involving IO synchronous operation sush pread ,
> ioctl, etc. So this patch unlock qemu_global_mutex before IO
> synchronous operation sush pread.
These preads are for 512-4096 bytes, can they really last much longer
than the "open" that precedes them? If pread of 4K can trigger a soft
lockup, things are really screwed up---and it's hard to be sure that all
callers of raw_probe_alignment are okay with releasing the global mutex.
Paolo
Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk, no-reply, 2019/06/10