qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mut


From: l00284672
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk
Date: Mon, 10 Jun 2019 22:51:42 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

The pread will hang in attaching disk just when backend storage network disconnection .

I think the locking range of qemu_global_mutex is too large when do qmp operation. what

does the qemu_global_mutex  really protect?  what is the risk of unlocking qemu_global_mutex

in qmp?


On 2019/6/10 21:51, Paolo Bonzini wrote:
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

.


Attachment: lizhengui.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]