From: Keir Fraser Subject: Re: [RFC] Correct/fast timestamping in apps under Xen [1 of 4]: Reliable TSC Date: Thu, 08 Oct 2009 07:54:46 +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)" Cc: "kurt.hackel@oracle.com" , Ian Pratt , Jeremy Fitzhardinge List-Id: xen-devel@lists.xenproject.org On 08/10/2009 07:45, "Keir Fraser" wrote: >> 1) On (Intel, maybe later AMD) systems where this >> bit is set, the mechanisms enabled by the >> Xen consistent_tscs boot option should be enabled >> automatically for Xen. >> 2) The time_calibration_tsc_rendezvous loop in >> timer.c could/should be rewritten or removed >> and certainly should NOT write_tsc(). >> >> Keir, I know you are very sensitive around >> this code, so thought I'd check before messing >> with it. Or feel free to do it yourself. > > Feel free to make a patch. At least, make a patch for (1). I don't think (2) can be easily removed in all cases. For example, Intel's method for rate-invariant TSC which stops on deep sleeps does involve rewriting TSC values to forcibly keep them in sync. Perhaps change code to never write_tsc() just in the case of TSC_RELIABLE, or whatever you call it? Or perhaps just do (1) for now. -- Keir