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] System time monotonicity

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [xen-devel] System time monotonicity
From: "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 8 Apr 2008 11:39:36 -0600
Delivery-date: Tue, 08 Apr 2008 10:42:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C4215F00.160C6%keir.fraser@xxxxxxxxxxxxx>
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>
Organization: Oracle Corporation
Reply-to: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciZl4WQxEBTGAWKEd2fxQAWy6hiGQABBvOA
> > Where is the code that does this independent TSC sync'ing?  I see
> > code in smpboot.c that seems to do this at startup (though exactly
> > how I admit I haven't yet figured out... looks like some kind of
> > rendezvous loop triggered by the BP?).  But I don't see where/how
> > this gets called "every couple of seconds", nor do I see any writing
> > to the TSC (except setting BP and each AP to zero at startup).
> 
> arch/x86/time.c:local_time_calibration()

OK, thanks.

If I read the code correctly, Xen goes through this effort to
ensure that the TSC's are synchronized, but maintains this
synchronization in a data structure and doesn't actually
change each processor's physical TSC.  Correct? This is of
course just fine for the hypervisor's timer needs (and thus
indirectly for paravirtualized domains).

But I also observe that all of the hvm platform timer (pit,
hpet, and pmtimer) code is built on top of the physical TSC
plus the vmx/svm tsc_offset which doesn't seem to be affected
by the Xen TSC synchronization.  True?

So assuming the above isn't mistaken, hvm domain reads of the
platform timer on an SMP system lacking hardware-synchronized
TSC may suffer from non-monotonicity.  Correct?

Thanks,
Dan


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