From: Dan Magenheimer Subject: RE: Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation Date: Mon, 2 Nov 2009 07:46:06 -0800 (PST) Message-ID: <78f9bb94-fb5d-4fe7-b20f-774bb14e360f@default> References: <4AED55C9.9010301@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4AED55C9.9010301@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Avi Kivity Cc: Jeremy Fitzhardinge , Jeremy Fitzhardinge , kurt.hackel@oracle.com, Glauber Costa , the arch/x86 maintainers , Linux Kernel Mailing List , Glauber de Oliveira Costa , Xen-devel , Keir Fraser , zach.brown@oracle.com, Ingo Molnar , chris.mason@oracle.com List-Id: xen-devel@lists.xenproject.org > > I don't have any public data available for this DB usage,=20 >=20 > Sorry, that doesn't explain anything. Well for now just consider the DB usage as another use of profiling. But one can easily draw scenarios where a monotonic timestamp is also used to guarantee transaction ordering. > > Search for "flight recorder". This feature is intended to > > be enabled all the time, but with non-vsyscall gettimeofday > > the performance impact is unacceptably high, so they are using =20 > > For profiling work fast timestamping is of course great, but surely=20 > there is no monotonicity requirement? Yes and no. Monotonicity is a poor substitute for a more generic mechanism that might provide an indication that a discontinuity has occurred (forward or backward); if an app could get both the timestamp AND some kind of "continuity generation counter" (basically a much more sophisticated form of TSC_AUX that changes whenever the timestamp is coming from a different source), perhaps all problems could be solved. > I don't think we'll be able to provide monotonicity with vsyscall on=20 > tsc-broken hosts, so we'll be limited to correcting the tsc frequency=20 > after migration for good-tsc hosts. True, though clock_gettime(CLOCK_MONOTONIC) can provide the monotonicity where it is required. Dan