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: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [RFC] [PATCH] use "reliable" tsc properly when available, but verify
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 29 Sep 2009 11:10:15 -0700 (PDT)
Cc:
Delivery-date: Tue, 29 Sep 2009 11:11:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C6E7FFBE.15FF2%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
> > Does that make more sense?
> 
> That makes it a nice-to-have. But not nice enough to have all 
> CPUs groove
> off for 2ms every once in a while, imo.

OK, rechecking may be too paranoid.  I will rewrite to
run once at boottime and resubmit. (Is 20ms at boottime
OK? 20ms matches Linux.)

> From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx]
> Sent: Monday, September 21, 2009 12:17 PM
>
> Well, if it is at least true for 99% of systems, then it 
> might be worth
> enabling constant_tsc support by default, and detect TSC divergence at
> runtime and disbale dynamically. I think that's what Linux 
> does (i.e., it
> has a fallback at runtime if its TSC assumptions turn out to 
> be wrong).

Looking more closely at the upstream Linux code though,
any processor deemed to have X86_FEATURE_TSC_RELIABLE
NEVER runs check_tsc_warp and never validates TSC (except
in the unusual circumstance that the kernel was compiled
with NUMAQ enabled).  If this feature is set,
Linux just uses tsc as the best clocksource and afaict
has no fallback.

I'd feel better running check_tsc_warp (at least) once
on ALL processors, even if X86_FEATURE_TSC_RELIABLE
is set.  Is that OK?  Or should we just trust it under
exactly the same circumstances as Linux does?

Thanks,
Dan

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