qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]