From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Stefan Weil <weil@mail.berlios.de>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer handler
Date: Fri, 24 Aug 2012 09:45:00 +0200 [thread overview]
Message-ID: <503730FC.2040305@redhat.com> (raw)
In-Reply-To: <503671E8.1090205@siemens.com>
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
prev parent reply other threads:[~2012-08-24 7:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 11:23 [Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer handler Jan Kiszka
2012-08-23 11:39 ` Paolo Bonzini
2012-08-23 12:10 ` Jan Kiszka
2012-08-23 12:24 ` Paolo Bonzini
2012-08-23 13:01 ` Jan Kiszka
2012-08-23 13:11 ` Paolo Bonzini
2012-08-23 18:09 ` Jan Kiszka
2012-08-24 7:45 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=503730FC.2040305@redhat.com \
--to=pbonzini@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
--cc=weil@mail.berlios.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).