From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [RFC] Correct/fast timestamping in apps under Xen [1 of 4]: Reliable TSC Date: Fri, 09 Oct 2009 17:22:43 -0700 Message-ID: <4ACFD3D3.4000900@goop.org> References: <1eed24f4-8ead-42ad-a050-5b8bf338d93f@default> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1eed24f4-8ead-42ad-a050-5b8bf338d93f@default> 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 Cc: kurt.hackel@oracle.com, Ian Pratt , "Xen-Devel (E-mail)" , Tim Deegan , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 10/09/09 14:35, Dan Magenheimer wrote: > Excellent! This is an extremely important piece > of the puzzle now filled in. > > Just for completeness, on your machine, what is > the measurement for raw rdtsc? > A naked inline rdtsc is about 30ns, so only about a factor of 3 better. Which is a surprisingly small improvement given that the full gettimeofday path has ~150 instructions, including a couple of multiplies, quite a few jumps and two "lsl" instructions for vgetcpu (which each cost about 10ns). rdtsc is an expensive instruction... J