Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion

2015-07-02 Thread Fam Zheng
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 >

Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion

2015-07-02 Thread Paolo Bonzini
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 block

Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion

2015-07-01 Thread Christian Borntraeger
Am 02.07.2015 um 08:33 schrieb Fam Zheng: > 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 blo

[Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion

2015-07-01 Thread Fam Zheng
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(). In this case, it may even be a perma