From: John Levon Subject: Re: System time monotonicity Date: Mon, 26 Mar 2007 21:04:47 +0100 Message-ID: <20070326200447.GA3730@totally.trollied.org.uk> References: <20070326182323.GA30728@totally.trollied.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline 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: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Mar 26, 2007 at 07:47:49PM +0100, Keir Fraser wrote: > >> From what I can work out, time is supposed to be monotonic but I admit I > > can't really understand the time code yet at least. I couldn't find any > > documentation on what to expect from system time. Any suggestions? > > > > This seems to happen across all the hardware we've tried but this > > particular case is a Sun V20Z with two CPUs: > > > > x86 (AuthenticAMD family 15 model 5 step 10 clock 2392 MHz) > > AMD Opteron(tm) Processor 250 > > Small backwards time deltas are possible from the current time code. You'll > have to filter them out yourself if you can't deal with them. We could add > extra code in Xen to stop this happening for any individual VCPU Some instrumentation indicated that we had cross-VCPU jitter of significant deltas, ~18us at worst. Though the instrumentation wasn't completely reliable so that might not be accurate. On real hardware we deal with any jitter via comparing against a regular clock on CPU0. This obviously won't work for Xen since we have no control over where VCPU0 actually lives. Presumably the Linux code (monotonic_clock() especially) must have something to handle it, but I can't see where... regards john