From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Roger Cruz <rcruz@marathontechnologies.com>,
xen-devel <xen-devel@lists.xensource.com>
Subject: Re: Kernel printk timestamps and walltime drift
Date: Fri, 13 Jun 2008 20:47:56 +0100 [thread overview]
Message-ID: <C4788D7C.19C91%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <40B551BEDC7945419A5897958AB3947CB35476@mtexch.marathontechnologies.com>
On 13/6/08 19:49, "Roger Cruz" <rcruz@marathontechnologies.com> wrote:
> You can see that the kernel time in the brackets (host up time in
> seconds) should have given us a difference of 3600 seconds when ran over
> an hr period. I, however, got 3592.770286, a slip of 7+ seconds. I've
> ran a similar experiment and over the course of 12hrs, the kernel
> timestamps lose 97 seconds!
>
> So unless I'm misunderstanding the printk times, the problem is either
> with the way the Linux OS converts TSC cycles to seconds not being very
> accurate OR how the hypervisor feeds the VM-ified TSC counts to the
> guest VM.
>
> Note that I'm sure the walltime was correct as I could monitor the
> printed walltime against an atomic clock in another window and it always
> matched (within the precision of my eyes moving back and forth, of
> course).
Do you know how the Debian kernel is computing its kernel-log timestamps?
One possibility here is that Xen system time is running at a slightly
different rate from wallclock (because the platform timer (PIT, HPET, etc)
is not running at exactly its stated frequency) and ntp running in dom0 only
keeps Xen's wallclock reference in sync -- it does not affect Xen's system
time. If the Debian kernel were perhaps based on jiffies rather than xtime,
I think that might explain the drift.
This hypothesis would require Xen's system time to be drifting at around
2000ppm, which is not great. I would expect a platform timer to be within a
few 100ppm of its advertised frequency, really (and with jitter of much less
than 10ppm).
-- Keir
next prev parent reply other threads:[~2008-06-13 19:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B99564216C25704085A82B41C46DD3427B060A@exchange.katana.local>
2008-06-13 17:53 ` Isolation and time Dan Magenheimer
2008-06-13 18:49 ` Kernel printk timestamps and walltime drift Roger Cruz
2008-06-13 19:47 ` Keir Fraser [this message]
2008-06-13 20:10 ` Roger Cruz
2008-06-13 20:31 ` Keir Fraser
2008-06-13 20:06 ` Dan Magenheimer
2008-06-13 21:05 ` Roger Cruz
2008-06-13 21:21 ` Dan Magenheimer
2008-06-13 21:36 ` Keir Fraser
2008-06-13 22:02 ` Roger Cruz
2008-06-13 22:09 ` Keir Fraser
2008-06-13 19:38 ` Isolation and time Keir Fraser
2008-06-14 2:20 ` Dan Magenheimer
2008-06-14 8:59 ` Keir Fraser
2008-06-14 15:16 ` Dan Magenheimer
2008-06-14 15:25 ` Keir Fraser
2008-07-01 0:22 ` Dan Magenheimer
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=C4788D7C.19C91%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=rcruz@marathontechnologies.com \
--cc=xen-devel@lists.xensource.com \
/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.