[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9-rc5 v2] block: Drain BH in bdrv_drained_

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for-2.9-rc5 v2] block: Drain BH in bdrv_drained_begin
Date: Tue, 18 Apr 2017 10:16:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 17/04/2017 05:33, Fam Zheng wrote:
> BDRV_POLL_WHILE in both IOThread and main loop has aio_context_acquire(ctx)
> around it; in the branch where main loop calls aio_poll(ctx, false),
> there is also no aio_context_release(ctx). So I thinki it is protected by the
> AioContext lock, and is safe.
> I tested your suggested "aio_poll(qemu_get_aio_context(), false)", but it
> doesn't work.

Right, that's because "aio_poll(qemu_get_aio_context(), false)" relies
on bdrv_wakeup on the I/O thread side (which in turn is triggered by
bdrv_inc_in_flight/bdrv_dec_in_flight), but the bottom half does not
have bdrv_inc_in_flight/bdrv_dec_in_flight around it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]