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: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: [Xen-devel] Re: rdtsc hypercall, from userland?!? (was: rdtsc: correctness vs performance on Xen)
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Wed, 09 Sep 2009 11:59:11 -0700
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Wed, 09 Sep 2009 11:59:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <6dfe825c-f49e-402e-81d0-e8eaee3c9cda@default>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3
On 09/09/09 11:05, Dan Magenheimer wrote:
>  BUT
> (IMPORTANT NEW POINT!!!) the pvclock algorithm requires
> an rdtsc instruction, and there is no way to
> emulate some guest rdtsc instructions (e.g. only
> those in apps) and not others (e.g. only those in
> the kernel).  Thus, for guests that have rdtsc emulation
> enabled, vsyscall+pvclock will be SLOWER than emulation,
> thus meaning it is still not a palatable alternative.
>   

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.

    J


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