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] [RFC] [PATCH] use "reliable" tsc properly when available

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC] [PATCH] use "reliable" tsc properly when available, but verify
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 28 Sep 2009 22:06:36 +0100
Cc:
Delivery-date: Mon, 28 Sep 2009 14:07:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C6E6E2B7.15E14%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/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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpAeQr2vU5z3PLHS7SvQkhD0izWqQABc0xbAAAuC78=
Thread-topic: [Xen-devel] [RFC] [PATCH] use "reliable" tsc properly when available, but verify
User-agent: Microsoft-Entourage/12.20.0.090605
On 28/09/2009 22:01, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

> 
> Surely it should be sufficient to check TSCs for consistency across all CPUs
> periodically, and against the chosen platform timer, and ensure none are
> drifting? An operation which would not require us to loop for 2ms and would
> provide rather more useful information than an ad-hoc multi-CPU
> race-to-update-a-shared-variable-an-arbitrary-and-large-number-of-times.

I should add, not only is the algorithm stupid and slow, but it doesn't even
check for exactly what RELIABLE_TSC guarantees -- constant-rate TSCs. This
would be useless on a single-CPU system, for example, or perhaps more
practically a single-socket system where all TSCs skewed together due to
package-wide power management. In the latter case TSCs would not skew
relative to each other, even though they could 'skew' relative to wallclock
(represented in Xen by the platform timer).

 -- Keir



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