[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
pgpZLmRCwknHi.pgp
Description: PGP signature
- [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me, Paolo Bonzini, 2015/07/16
- [Qemu-devel] [PATCH v2 2/3] aio-win32: reorganize polling loop, Paolo Bonzini, 2015/07/16
- [Qemu-devel] [PATCH v2 1/3] tests: remove irrelevant assertions from test-aio, Paolo Bonzini, 2015/07/16
- [Qemu-devel] [PATCH v2 3/3] AioContext: fix broken ctx->dispatching optimization, Paolo Bonzini, 2015/07/16
- Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me, Kevin Wolf, 2015/07/16
- Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me, Richard W.M. Jones, 2015/07/16
- Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me, Richard W.M. Jones, 2015/07/16