qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer hand


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer handler
Date: Fri, 24 Aug 2012 09:45:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

Il 23/08/2012 20:09, Jan Kiszka ha scritto:
> On 2012-08-23 15:11, Paolo Bonzini wrote:
>>>> So, in order to remove the qemu_notify_event completely, what about not
>>>> using signals anymore for timers?  You could just tweak the select
>>>> timeout and drop all the -clock madness.  Zero syscalls, practically no
>>>> overhead.  If this is not precise enough, use timerfd on Linux only
>>>
>>> Need to think about it. At least, real-time tasks will get proper
>>> precision on Linux. Not sure if it will be sufficient on other hosts.
>>
>> Do we care (I put non-Linux POSIX just a little above Windows but not much)?
> 
> Well, at least we should not regress.
> 
> For Windows I just found out that we support millisecond resolution in
> os_host_main_loop_wait at best due to g_poll.

Right.  But mm timers and timer queues also use millisecond resolution.

> That would be fine, but
> what is g_poll really using? Likely not mm-timers...

It is using WaitForMultipleObjects, but what matters in Windows is not
really the timing source you're using.  All that matters is that you use
timeBeginPeriod to set the process quantum.  Windows will use the lowest
quantum requested by a running process.  So timeBeginPeriod will affect
the precision even if you use another time source than mm timers.

(In fact, timer queues do not work on Windows, but in my experience work
and are cheaper under Wine.  I wonder if it's because timer queues do
not call timeBeginPeriod...).

Paolo




reply via email to

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