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] RE: rdtsc: correctness vs performance on Xen (and KVM?)

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?)
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 01 Sep 2009 22:25:40 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 01 Sep 2009 14:29:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A9D62460200007800012BA1@xxxxxxxxxxxxxxxxxx>
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
Thread-index: AcorHfNGz9Y1nt/3T2K+ZvdFK5cp2QALM3KI
Thread-topic: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?)
User-agent: Microsoft-Entourage/12.20.0.090605
On 01/09/2009 17:04, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>>>> Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> 01.09.09 17:56 >>>
>> Can you think of any trick (that doesn't require the cost of a
>> trap/hypercall) to allow an app to determine what pcpu
>> it is running on?
> 
> Just like what is being used to allow apps to get the CPU number on native
> kernels (or the vCPU one on Xen-ified ones): Have a GDT entry the limit of
> which is the number you want, and have the app use the lsl instruction to
> get at it.

Yes, that's true. Xen could provide such a segment descriptor in its private
area of the GDT. The issue then would be that, in a compound pvclock
operation spanning multiple machine instructions, the pCPU number revealed
by the LSL instruction can be stale by the time it is used later in the
compound operation.

 -- Keir



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

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