[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers |
Date: |
Thu, 25 Jul 2013 11:38:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
Il 25/07/2013 11:37, Alex Bligh ha scritto:
> Stefan,
>
>> This should be one of the last patches so qemu.git remains bisectable.
>> Only remove the alarm timer once the event loops are already using the
>> timeout argument.
>
> OK
>
>>> @@ -245,11 +82,7 @@ static QEMUClock *qemu_new_clock(int type)
>>>
>>> void qemu_clock_enable(QEMUClock *clock, bool enabled)
>>> {
>>> - bool old = clock->enabled;
>>> clock->enabled = enabled;
>>> - if (enabled && !old) {
>>> - qemu_rearm_alarm_timer(alarm_timer);
>>> - }
>>
>> If this function is supposed to work when called from another thread
>> (e.g. vcpu thread), then you need to call qemu_notify_event(). For
>> AioContext clocks that should be aio_notify() with the relevant
>> AioContext, but we don't need that yet.
>
> Each AioContext knows which clock it has but each clock doesn't know if
> it's part of an AioContext. I suggest this is infrequent enough that always
> using qemu_notify_event() would be OK. That should interrupt any poll.
No, qemu_notify_event() only interrupts the main clock's poll.
Paolo
- [Qemu-devel] [PATCHv2] [RFC 7/7] aio / timers: Add test harness for AioContext timers, (continued)
Re: [Qemu-devel] [PATCHv2] [RFC 0/7] aio / timers: Add AioContext timers and use ppoll, Stefan Hajnoczi, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 00/12] aio / timers: Add AioContext timers and use ppoll, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 02/12] aio / timers: add ppoll support with qemu_poll_ns, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 03/12] aio / timers: Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 04/12] aio / timers: Make qemu_run_timers and qemu_run_all_timers return progress, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 06/12] aio / timers: Add an AioContext pointer to QEMUClock, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 05/12] aio / timers: Add a clock to AioContext, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 01/12] aio / timers: add qemu-timer.c utility functions, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 07/12] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 08/12] aio / timers: Convert aio_poll to use AioContext timers' deadline, Alex Bligh, 2013/07/25