qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v2 2/2] aio: Do aio_notify_accept only during bl


From: Paolo Bonzini
Subject: Re: [Qemu-block] [PATCH v2 2/2] aio: Do aio_notify_accept only during blocking aio_poll
Date: Tue, 7 Aug 2018 12:15:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 07/08/2018 11:16, Fam Zheng wrote:
>     main thread                     IO Thread
>     ===============================================================
>     bdrv_drained_begin()
>       aio_disable_external(ctx)
>                                     aio_poll(ctx, true)
>                                       ctx->notify_me += 2
>                                       ppoll() /* blocked */
>     ...
>     bdrv_drained_end()
>       ...
>         aio_notify()
>     ...
>     bdrv_set_aio_context()
>       aio_poll(ctx, false)
> [1]     aio_notify_accept(ctx)
>                                       /* Hang! */

Should ppoll() rather be after [1]?  Otherwise the new commit message
and patches look great.

> aio_notify() only injects an event when ctx->notify_me is set,
> correspondingly aio_notify_accept() is only useful when ctx->notify_me
> _was_ set.

Very good point.

(Please Cc qemu-stable on the second patch too).

Paolo



reply via email to

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