From: Keir Fraser Subject: Re: [RFC] [PATCH] use "reliable" tsc properly when available, but verify Date: Tue, 29 Sep 2009 08:43:03 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org On 28/09/2009 23:05, "Dan Magenheimer" wrote: > Note that upstream Linux NEVER writes to TSC anymore. > If the check_tsc_warp test fails, tsc is simply marked > as an unreliable mechanism other than for interpolating > within a jiffie. If OS's had some intrinsic to describe > this "reliable vs unreliable TSC" to apps, lots of troubles > could have been avoided. But that's roughly what I > am trying to do with pvrdtscp so I'm trying to be very > sure that when Xen says it is, TSC is both reliable and > continues to be reliable. (Though maybe once at boottime > is sufficient.) Given that TSC is now emulated, who cares what the underlying CPUs say about TSC reliability. Xen emulates the TSC with its own system time, and even explicitly checks that the returned TSC value is monotonically increasing. So TSC is alweays 'reliable' for guests, regardless of host TSC behaviour. So on this count, too, the patch is a reject. -- Keir