[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion |
Date: |
Thu, 2 Jul 2015 15:17:40 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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