From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
Fam Zheng <famz@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()
Date: Wed, 17 May 2017 16:47:19 -0400 (EDT) [thread overview]
Message-ID: <1874132859.8716126.1495054039026.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <e6d9417e-87bb-a88f-4f55-0a72aae0a212@redhat.com>
> I'm surprised at how many separate hangs we actually had!
Note that I have seen quite a few before, though I am not sure about
the details and the reproducibility. The release/acquire was hidden
behind RFifoLock contention callbacks instead of BDRV_POLL_WHILE.
Paolo
> >
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> > block/io.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> >
> > diff --git a/block/io.c b/block/io.c
> > index cc56e90..f0041cd 100644
> > --- a/block/io.c
> > +++ b/block/io.c
> > @@ -2031,9 +2031,7 @@ bdrv_rw_vmstate(BlockDriverState *bs, QEMUIOVector
> > *qiov, int64_t pos,
> > Coroutine *co = qemu_coroutine_create(bdrv_co_rw_vmstate_entry,
> > &data);
> >
> > bdrv_coroutine_enter(bs, co);
> > - while (data.ret == -EINPROGRESS) {
> > - aio_poll(bdrv_get_aio_context(bs), true);
> > - }
> > + BDRV_POLL_WHILE(bs, data.ret == -EINPROGRESS);
> > return data.ret;
> > }
>
> Do we have other culprits (not necessarily for vmsave, but for other
> situations), where we should be using BDRV_POLL_WHILE in separate
> patches? For example, a quick grep show that at least hw/9pfs/9p.c makes
> a direct call to aio_poll(,true) in a while loop.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
>
>
next prev parent reply other threads:[~2017-05-17 20:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 17:09 [Qemu-devel] [PATCH 0/3] block: fix 'savevm' hang with -object iothread Stefan Hajnoczi
2017-05-17 17:09 ` [Qemu-devel] [PATCH 1/3] block: count bdrv_co_rw_vmstate() requests Stefan Hajnoczi
2017-05-17 20:09 ` Eric Blake
2017-05-17 17:09 ` [Qemu-devel] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate() Stefan Hajnoczi
2017-05-17 20:16 ` Eric Blake
2017-05-17 20:47 ` Paolo Bonzini [this message]
2017-05-18 7:57 ` Kevin Wolf
2017-05-18 8:06 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-05-18 8:22 ` Kevin Wolf
2017-05-18 8:05 ` Stefan Hajnoczi
2017-05-17 17:09 ` [Qemu-devel] [PATCH 3/3] migration: avoid recursive AioContext locking in save_vmstate() Stefan Hajnoczi
2017-05-17 20:24 ` Eric Blake
2017-05-18 8:18 ` Kevin Wolf
2017-05-19 9:07 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-05-17 20:49 ` [Qemu-devel] [PATCH 0/3] block: fix 'savevm' hang with -object iothread Paolo Bonzini
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=1874132859.8716126.1495054039026.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).