From: Jan Kiszka <jan.kiszka@web.de>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] [RFC] time: refactor QEMU timer to use GHRTimer
Date: Tue, 23 Aug 2011 01:48:47 +0200 [thread overview]
Message-ID: <4E52EADF.6000507@web.de> (raw)
In-Reply-To: <4E52D04D.7040606@us.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]
On 2011-08-22 23:55, Anthony Liguori wrote:
>>>> These two assessments are partly just wrong, partly fail to see the
>>>> real
>>>> use case. QEMU_CLOCK_HOST serves the very valid scenarios where a guest
>>>> clock shall be kept synchronized on the host time, also following its
>>>> jumps accordingly without stalling timers.
>>>
>>> The only reason we see jumps at all is because we're using
>>> CLOCK_MONOTONIC or CLOCK_REALTIME. If we used CLOCK_MONOTONIC_RAW, we
>>> don't see any jumps at all.
>>
>> CLOCK_MONOTONIC will not jump backward as well, so is perfectly fine and
>> better portable. Backward jumps cannot be avoided when using a host
>> system clock that is subject to follow a more accurate external source.
>> But having such source for RTC emulation e.g. is a useful feature.
>
> I think its of limited utility. The RTC isn't universally used for time
> keeping. There's also no guarantee that the guest isn't going to be
> upset by this.
That's why it's configurable. On the other hand, most guests are
well-prepared to deal with the RTC and the host runtime clock source not
being in sync. That's why we had no bug reports after making this mode
default.
>
> I think a better approach is to simply have a verb in qemu-ga to set/get
> the guest time. That let's you implement clock adjustment without
> having to worry about NTP. I'm happy to add that as part of this series.
That's not that easy in legacy guests, even more when they aren't Linux.
>
> I don't think messing around with this stuff belongs in the QEMU clock
> layer though.
It's really not messing, the impact is almost minimal.
Let's focus on the real big pieces first and then see what CLOCK_HOST
actually contributes. That also means you should split up you patches a
bit more, already for better bisectability.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2011-08-22 23:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 19:21 [Qemu-devel] [PATCH 1/2] main: add high resolution GSource based timer Anthony Liguori
2011-08-22 19:21 ` [Qemu-devel] [PATCH 2/2] [RFC] time: refactor QEMU timer to use GHRTimer Anthony Liguori
2011-08-22 20:28 ` Jan Kiszka
2011-08-22 20:36 ` Anthony Liguori
2011-08-22 20:49 ` Jan Kiszka
2011-08-22 21:55 ` Anthony Liguori
2011-08-22 23:48 ` Jan Kiszka [this message]
2011-08-23 8:12 ` Paolo Bonzini
2011-08-23 9:07 ` Edgar E. Iglesias
2011-08-23 7:43 ` Paolo Bonzini
2011-08-23 12:33 ` Anthony Liguori
2011-08-23 12:44 ` Paolo Bonzini
2011-08-22 19:26 ` [Qemu-devel] [PATCH 1/2] main: add high resolution GSource based timer Anthony Liguori
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=4E52EADF.6000507@web.de \
--to=jan.kiszka@web.de \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.