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

[Xen-devel] Guest TSC and Xen (Intel and AMD feedback please)

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Guest TSC and Xen (Intel and AMD feedback please)
From: "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 1 Jul 2008 11:33:14 -0600
Delivery-date: Tue, 01 Jul 2008 10:33:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Organization: Oracle Corporation
Reply-to: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjboIivPTuddHlLSIGPaPhte5VM5w==
Various versions of Linux under various circumstances select
TSC as the primary clocksource for the kernel.  This is
especially true for uniprocessor kernels, but also in some
cases for multiprocessor kernels.  In most cases, this
is because a processor bit (tsc_invariant? constant_tsc?)
is passed through directly from the hardware via Xen and
tested by the hvm guest and the result implies that the
TSC is "stable".

I'd like to propose that, for a Xen hvm guest, TSC should
NEVER be considered stable.  For at least these reasons:

1) Often this test is done once at guest boot; if the guest
   migrates to another machine without the bit set, time
   will be erratic.
2) I *think* that in some cases even within the same system,
   TSC values will skew somewhat.  Since a uniprocessor guest
   will often be rescheduled to a different pcpu by Xen,
   the underlying tsc may appear erratic.

Comments (especially from Intel and AMD)?

If agreed, could Intel and AMD provide patches so that hvm
reads of the bits return "false"?  Or will this cause other
problems?

Another alternative would be to trap all rdtsc's and emulate
them but this probably will not be easy and may have
significant performance implications.  But perhaps it should
be an option?

Dan

===================================
Thanks... for the memory
I really could use more / My throughput's on the floor
The balloon is flat / My swap disk's fat / I've OOM's in store
Overcommitted so much
(with apologies to the late great Bob Hope)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel