Re: [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll

2013-07-23 Thread Alex Bligh
Liu, --On 23 July 2013 10:56:42 +0800 liu ping fan wrote: I am told (by Stefan H) this approach is unsafe as existing timers may not expect to be run within aio_poll. Have not figure out the reason, could you elaborate ? I asked Stefan H whether we could guarantee that it was safe to call

Re: [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll

2013-07-22 Thread liu ping fan
On Sun, Jul 21, 2013 at 5:55 PM, Alex Bligh wrote: > > > --On 21 July 2013 16:43:03 +0800 Liu Ping Fan wrote: > >> diff --git a/aio-posix.c b/aio-posix.c >> index b68eccd..29c2769 100644 >> --- a/aio-posix.c >> +++ b/aio-posix.c >> @@ -191,6 +191,8 @@ bool aio_poll(AioContext *ctx, bool blocking)

Re: [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll

2013-07-21 Thread Alex Bligh
--On 21 July 2013 16:43:03 +0800 Liu Ping Fan wrote: diff --git a/aio-posix.c b/aio-posix.c index b68eccd..29c2769 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -191,6 +191,8 @@ bool aio_poll(AioContext *ctx, bool blocking) progress = true; } +qemu_run_all_timers(); +

[Qemu-devel] [RFC 6/8] timer: run timers on aio_poll

2013-07-21 Thread Liu Ping Fan
Stop call timers in main loop and let each mini event-loop run its own timers. Signed-off-by: Liu Ping Fan --- aio-posix.c | 2 ++ main-loop.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index b68eccd..29c2769 100644 --- a/aio-posix.c +++ b/ai