Re: [Qemu-devel] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch

2013-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2013 at 03:53:55PM +0100, Alex Bligh wrote: > Stefan, > > --On 25 July 2013 11:33:43 +0200 Stefan Hajnoczi wrote: > > >> assert(progress || busy); > >>-return true; > >>+return progress; > > > >Now aio_poll() can return false when it used to return true? > > I don't

Re: [Qemu-devel] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch

2013-07-25 Thread Alex Bligh
Stefan, I missed a couple of comments. --On 25 July 2013 11:33:43 +0200 Stefan Hajnoczi wrote: @@ -214,6 +221,15 @@ bool aio_poll(AioContext *ctx, bool blocking) events[ret - WAIT_OBJECT_0] = events[--count]; } +if (blocking) { +/* Run the timers a second time. We d

Re: [Qemu-devel] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch

2013-07-25 Thread Alex Bligh
Stefan, --On 25 July 2013 11:33:43 +0200 Stefan Hajnoczi wrote: assert(progress || busy); -return true; +return progress; Now aio_poll() can return false when it used to return true? I don't think that's a bug. Firstly, this is the same thing you fixed and we discussed on ano

Re: [Qemu-devel] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:42PM +0100, Alex Bligh wrote: > @@ -245,11 +249,13 @@ bool aio_poll(AioContext *ctx, bool blocking) > node->pfd.revents = pfd->revents; > } > } > -if (aio_dispatch(ctx)) { > -progress = true; > -} > +

[Qemu-devel] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch

2013-07-20 Thread Alex Bligh
Switch to ppoll (or rather qemu_g_poll_ns which will use ppoll if available). Set timeouts for aio, g_source, and mainloop from earliest timer deadline. Run timers for AioContext (only) in aio_poll/aio_dispatch. Signed-off-by: Alex Bligh --- aio-posix.c | 20 +--- aio-win32.c