This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [xen-devel] System time monotonicity

To: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [xen-devel] System time monotonicity
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 09 Apr 2008 17:40:50 +0100
Delivery-date: Wed, 09 Apr 2008 09:43:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080409103358093.00000004064@djm-pc>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-topic: [xen-devel] System time monotonicity
User-agent: Microsoft-Entourage/
On 9/4/08 17:33, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

>> This is all true. The logic in vpt.c should be fixed to use
>> Xen's concept of
>> system time and everything, guest TSC included, should be
>> derived from that.
> Does Xen's concept of system time have sufficient resolution
> and continuity to ensure both monotonicity and a reasonable
> guest timer granularity?  I'm thinking not; some form of
> interpolation will probably be necessary which will require
> reading a physical platform timer** (e.g. other than tsc).

Xen's system time provides nanosecond precision and is intended to be as
accurate as the underlying platform timer (over long periods) and as
granular and accurate as the TSC over sub-second periods. It's quite good
enough for any guest purposes.

> Since a guest that is presented with a (virtual) platform timer
> of a given resolution may come to rely on both the monotonicity
> AND resolution of that timer, I'm beginning to understand why
> "that other virtualization company" doesn't virtualize HPET.

The HPET is a good example of the difference between precision and accuracy.
It may report its period in picoseconds, but the spec allows drift of 100s
of ppm.

 -- Keir

Xen-devel mailing list