On Tue, Aug 04, 2020 at 09:12:46AM +0200, Paolo Bonzini wrote:
> On 04/08/20 07:28, Stefan Hajnoczi wrote:
> > @@ -425,19 +425,14 @@ void aio_notify(AioContext *ctx)
> > smp_mb();
> > if (atomic_read(&ctx->notify_me)) {
> > event_notifier_set(&ctx->notifier);
> > -atomic_
On 04/08/20 07:28, Stefan Hajnoczi wrote:
> @@ -425,19 +425,14 @@ void aio_notify(AioContext *ctx)
> smp_mb();
> if (atomic_read(&ctx->notify_me)) {
> event_notifier_set(&ctx->notifier);
> -atomic_mb_set(&ctx->notified, true);
> }
> +
> +atomic_mb_set(&ctx->notif
aio_notify() does not set ctx->notified when called with
ctx->aio_notify_me disabled. In order to poll ctx->notified it is
therefore necessary to enable ctx->aio_notify_me.
This is suboptimal since expensive event_notifier_set(&ctx->notifier)
and event_notifier_test_and_clear(&ctx->notifier) calls