From: Keir Fraser Subject: Re: RE: rdtsc: correctness vs performance on Xen (and KVM?) Date: Wed, 02 Sep 2009 08:20:06 +0100 Message-ID: References: <4A9DAD94.2090105@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A9DAD94.2090105@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge , Dan Magenheimer Cc: "Xen-Devel (E-mail)" , Jan Beulich , Alan Cox List-Id: xen-devel@lists.xenproject.org On 02/09/2009 00:26, "Jeremy Fitzhardinge" wrote: > On 09/01/09 15:41, Dan Magenheimer wrote: >> Won't pvclock+vsyscall have the same race? > > Yes, it would need to be resolved either way. The problem is a bit easier with vsyscall potentially. For example, give each thread its own vsyscall clock data area (easy?), updated by kernel whenever the thread is scheduled, and increment a version counter, checked before and after by the vsyscall operation. Well, I don't know how easy or fast that could actually be implemented, but I'm at least confident it could work. But it does need kernel assistance. -- Keir