WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Add the USE_PLATFORM_TIMER flag to the FADT, to

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Add the USE_PLATFORM_TIMER flag to the FADT, to make w2k3 use the PMTIMER
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Thu, 3 Jun 2010 09:58:01 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 03 Jun 2010 01:59:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9e1bc68e-a223-4ea6-aab8-5c0ad3e1aca5@default>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <39014be2745a52964fe7.1275473949@xxxxxxxxxxxxxxxxxxxxxxxx> <9e1bc68e-a223-4ea6-aab8-5c0ad3e1aca5@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
Hi, 

At 18:46 +0100 on 02 Jun (1275504378), Dan Magenheimer wrote:
> Could you say more about this?  Which default timesource is
> drifting?  Aren't all HVM platform timers emulated on top
> of Xen system time?  Does w2k3 use rdtsc directly... under
> what circumstances?

w2k3 will use RDTSC for its fine-grained time source (the one that's
exposed as a performance counter) even if the ACPI PMTIMER is available,
unless it's encouraged by this ACPI flag or the "/PMTIMER" boot.ini
switch.  W2k3sp2 and later Windowses use the PMTIMER by default,
presumably because of the let's-not-go-into-it-again difficulties with
using RDSTC as a time source.

http://blogs.technet.com/b/perfguru/archive/2008/02/18/explanation-for-the-usepmtimer-switch-in-the-boot-ini.aspx

Under stress testing, we found that this time source could drift (by
several percent) relative to real time, where the PMTIMER-based one did
not.

Yes, HVM timers are all based on the same source, except the RTC, which
is still implemented as a recurring timer event.  I suspect that the
drift is in the way Windows interprets the TSC values.  It could be, for
example, that it's warping forward to avoid cross-CPU
time-going-backward issues.

Cheers,

Tim.

> > -----Original Message-----
> > From: Tim Deegan [mailto:Tim.Deegan@xxxxxxxxxx]
> > Sent: Wednesday, June 02, 2010 4:19 AM
> > To: xen-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: [Xen-devel] [PATCH] Add the USE_PLATFORM_TIMER flag to the
> > FADT, to make w2k3 use the PMTIMER
> > 
> > because the default timesource (TSC) drifts under load.
> > 
> > The flag is only defined in ACPI 3.0, and we provide ACPI 2.0 tables,
> > but Windows seems happy enough to obey it anyway.
> > 
> > Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
> > 
> > 

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel