qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 3/3] AioContext: fix broken ctx->dispatching


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 3/3] AioContext: fix broken ctx->dispatching optimization
Date: Fri, 17 Jul 2015 09:39:34 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Jul 17, 2015 at 06:17:47AM +0200, Paolo Bonzini wrote:
> 
> 
> On 16/07/2015 11:56, Paolo Bonzini wrote:
> > @@ -286,13 +283,15 @@ bool aio_poll(AioContext *ctx, bool blocking)
> >      npfd = 0;
> >      ctx->walking_handlers--;
> >  
> > +    if (blocking) {
> > +        atomic_sub(&ctx->notify_me, 2);
> > +    }
> > +
> 
> I kept this place for subtracting notify_me because it is the same place
> where aio_set_dispatching was called.  However, it can be anticipated to
> 
>      /* if we have any readable fds, dispatch event */
>      if (ret > 0) {
>          for (i = 0; i < npfd; i++) {
> 
> i.e. right after poll.  As poll has exited, it can't be blocking the
> thread anymore.  Stefan, please let me send v3 on Monday.

Sure.

Stefan

Attachment: pgpZLmRCwknHi.pgp
Description: PGP signature


reply via email to

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