From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
borntraeger@de.ibm.com, qemu-devel@nongnu.org,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion
Date: Thu, 2 Jul 2015 15:17:40 +0800 [thread overview]
Message-ID: <20150702071740.GB31230@ad.nay.redhat.com> (raw)
In-Reply-To: <5594E43E.1040400@redhat.com>
On Thu, 07/02 09:11, Paolo Bonzini wrote:
>
>
> On 02/07/2015 08:33, Fam Zheng wrote:
> > bdrv_flush() uses a loop like
> >
> > while (rwco.ret == NOT_DONE) {
> > aio_poll(aio_context, true);
> > }
> >
> > to wait for thread pool, which may not get notified about the scheduled
> > BH right away, if there is no new event that wakes up a blocking
> > qemu_poll_ns().
>
> That translates to "the dispatching optimization does not work". :) I
> do not think that is the problem.
I must be missing something. I see a hang locally with some AioContext patches
I'm testing, and this does fix it.
I traced that qemu_bh_schedule does call aio_notify and event_notifier_set, so
it's curious. Still looking.
Fam
prev parent reply other threads:[~2015-07-02 7:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 6:33 [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion Fam Zheng
2015-07-02 6:45 ` Christian Borntraeger
2015-07-02 7:11 ` Paolo Bonzini
2015-07-02 7:17 ` Fam Zheng [this message]
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=20150702071740.GB31230@ad.nay.redhat.com \
--to=famz@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--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).