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

[Xen-devel] Re: rdtsc hypercall, from userland?!? (was: rdtsc: correctne

To: "Jeremy Fitzhardinge" <jeremy@xxxxxxxx>, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Subject: [Xen-devel] Re: rdtsc hypercall, from userland?!? (was: rdtsc: correctness vs performance on Xen)
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 10 Sep 2009 10:59:04 +0100
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 10 Sep 2009 02:59:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AA7FAFF.20505@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>
References: <6dfe825c-f49e-402e-81d0-e8eaee3c9cda@default> <4AA7FAFF.20505@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Jeremy Fitzhardinge <jeremy@xxxxxxxx> 09.09.09 20:59 >>>
>You could enable/disable emulation rdtsc each context switch according
>to the app's desires/requrements.  It would require an extra hypercall
>per context switch, but it could be batched with the others, resulting
>in little marginal cost.  It would, however, leave the kernel's use of
>rdtsc in a confused state.

Not necessarily: There could be two flags, one saying app rdtsc needs to
be emulated, and a second one for the kernel ones'. Unless a pv kernel
wants this, its (emulated) reads could still return the real (hardware)
value rather than the calculated, 1GHz-based one.

Jan


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