qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_no


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_notifier_test_and_clear
Date: Mon, 20 Jul 2015 15:46:25 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, 07/20 07:27, Paolo Bonzini wrote:
> diff --git a/aio-win32.c b/aio-win32.c
> index ea655b0..7afc999 100644
> --- a/aio-win32.c
> +++ b/aio-win32.c
> @@ -337,10 +337,11 @@ bool aio_poll(AioContext *ctx, bool blocking)
>              aio_context_acquire(ctx);
>          }
>  
> -        if (first && aio_bh_poll(ctx)) {
> -            progress = true;
> +        if (first) {
> +            event_notifier_test_and_clear(&ctx->notifier);

I'm looking at optimizing it but I don't fully understand the relationship
between aio_prepare and WaitForMultipleObjects. Do they get the same set of
events? What if a new event comes in between, for example, thread worker calls
aio_notify()?

Fam

> +            progress |= aio_bh_poll(ctx);
> +            first = false;
>          }
> -        first = false;
>  
>          /* if we have any signaled events, dispatch event */
>          event = NULL;



reply via email to

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