From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhengui li <lizhengui@huawei.com>,
stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com
Cc: jiangyiwen@huawei.com, wangjie88@huawei.com,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
eric.fangyi@huawei.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk
Date: Mon, 10 Jun 2019 15:51:40 +0200 [thread overview]
Message-ID: <1a218c83-7167-68c4-798f-2870f2f98475@redhat.com> (raw)
In-Reply-To: <1560173684-6264-1-git-send-email-lizhengui@huawei.com>
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
next prev parent reply other threads:[~2019-06-10 14:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 13:34 [Qemu-devel] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk Zhengui li
2019-06-10 13:51 ` Paolo Bonzini [this message]
2019-06-10 14:51 ` [Qemu-devel] [Qemu-block] " l00284672
2019-06-10 16:03 ` Paolo Bonzini
2019-06-11 2:53 ` l00284672
2019-06-11 8:49 ` Kevin Wolf
2019-06-10 14:12 ` [Qemu-devel] " no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a218c83-7167-68c4-798f-2870f2f98475@redhat.com \
--to=pbonzini@redhat.com \
--cc=eric.fangyi@huawei.com \
--cc=jiangyiwen@huawei.com \
--cc=kwolf@redhat.com \
--cc=lizhengui@huawei.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=wangjie88@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).