WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [RFC] Correct/fast timestamping in apps under Xen [1 of

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] [RFC] Correct/fast timestamping in apps under Xen [1 of 4]: Reliable TSC
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Fri, 9 Oct 2009 19:36:39 -0700 (PDT)
Cc: kurt.hackel@xxxxxxxxxx, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Fri, 09 Oct 2009 19:37:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4ACFD3D3.4000900@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> 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

Very nice!

One more measurement if you haven't already torn down
your test environment:   If you are at xen-unstable tip,
with tsc emulation on, please try something like:

for i in {0..100}; do
xm debug-key s; xm dmesg | tail; sleep 1;
done

to get an idea of the number of rdtsc's being
done per second (and also divide by the number
of cores so we have rdtsc's/sec/core).  This is
of course unloaded, so if you have a favorite
load to throw on it, that would be very interesting
also.

(Note that the s debug-key may be slow because
xen is also now running check_tsc_warp each time.)

Thanks,
Dan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>