[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll
From: |
liu ping fan |
Subject: |
Re: [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll |
Date: |
Tue, 23 Jul 2013 10:56:42 +0800 |
On Sun, Jul 21, 2013 at 5:55 PM, Alex Bligh <address@hidden> wrote:
>
>
> --On 21 July 2013 16:43:03 +0800 Liu Ping Fan <address@hidden> 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();
>> +
>> if (progress && !blocking) {
>> return true;
>> }
>
>
> 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 ?
Thanks
> Also, I suspect you need to change the value of progress if timers
> run so bdrv draining terminates properly.
>
Yes, you are right
> --
> Alex Bligh
- Re: [Qemu-devel] [RFC 1/8] timer: associate alarm_timer with AioContext, (continued)
- [Qemu-devel] [RFC 2/8] timer: pick out timer list info from QemuClock, Liu Ping Fan, 2013/07/21
- [Qemu-devel] [RFC 3/8] timer: make timers_state static, Liu Ping Fan, 2013/07/21
- [Qemu-devel] [RFC 4/8] timer: protect timers_state with lock, Liu Ping Fan, 2013/07/21
- [Qemu-devel] [RFC 5/8] timer: associate timer with AioContext, Liu Ping Fan, 2013/07/21
- [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll, Liu Ping Fan, 2013/07/21
- [Qemu-devel] [RFC 7/8] block: associate BlockDriverState with AioContext, Liu Ping Fan, 2013/07/21
- [Qemu-devel] [RFC 8/8] block: enable throttle with aiocontext, Liu Ping Fan, 2013/07/21
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/21
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/22