[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] [PATCHv8 12/30] aio / timers: aio_ctx_prepare set
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC] [PATCHv8 12/30] aio / timers: aio_ctx_prepare sets timeout from AioContext timers |
Date: |
Fri, 09 Aug 2013 16:41:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
Il 09/08/2013 16:30, Alex Bligh ha scritto:
>
> On 9 Aug 2013, at 11:04, Paolo Bonzini wrote:
>
>>> @@ -180,7 +189,7 @@ aio_ctx_check(GSource *source)
>>> return true;
>>> }
>>> }
>>> - return aio_pending(ctx);
>>> + return aio_pending(ctx) || (timerlistgroup_deadline_ns(ctx->tlg) == 0);
>>
>> Again, if we do the "two AioContext" tricks, the
>> timerlistgroup_deadline_ns function would be internal to AioContext.
>
> I don't think that's true as I think we'd still want to encapsulate
> walking the array of clocks within qemu-timer.c.
It would just be these five lines of code, no?
for (type = 0; type < QEMU_CLOCK_MAX; type++) {
if (qemu_clock_use_for_deadline(qemu_clock_ptr(type))) {
deadline = qemu_soonest_timeout(deadline,
timerlist_deadline_ns(ctx->timerlist[type]));
}
}
I'm not sure if it is a worthwhile to keep 80 lines of code just to
abstract a single loop.
Paolo
- [Qemu-devel] [RFC] [PATCHv8 02/30] aio / timers: add qemu-timer.c utility functions, (continued)
[Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Alex Bligh, 2013/08/08
- Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Paolo Bonzini, 2013/08/09
- Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Alex Bligh, 2013/08/09
- Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Paolo Bonzini, 2013/08/09
- Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Alex Bligh, 2013/08/09
- Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Paolo Bonzini, 2013/08/09
- Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Alex Bligh, 2013/08/09
- Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Paolo Bonzini, 2013/08/09
Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper, Alex Bligh, 2013/08/09