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: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?)
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 1 Sep 2009 09:55:43 -0700 (PDT)
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 01 Sep 2009 09:56:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C6C304F8.A402%keir.fraser@xxxxxxxxxxxxx>
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
> >> Not within today's Xen or Linux (which both assume a global kernel
> >> address space, in particular non-root page table entries
> >> mapping kernel
> >> space to be the same in all address spaces - you'd need
> >> separate entries
> >> at all levels for this).
> > 
> > OK, I forgot: No software-accessible TLB.
> > 
> > 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?
> 
> I can't think of any that don't require kernel modifications. 
> Which takes us
> back to considering vsyscall, perhaps.
> 
>  -- Keir

If a solution that doesn't require kernel mods is not
possible, then I suspect apps will continue to use
rdtsc as-is and suffer the emulation overhead.
Requiring all customers to update the OS underlying
these apps is a non-starter.

Also, it has yet to be proven that pvclock can
work in a vsyscall.  Doesn't the same per-cpu in
userspace problem exist?   Pvclock without vsyscall
has been measured and is too slow, so until a vsyscall
version of pvclock
is implemented and measured (let alone upstream or
available in distros), it's hard to call it an
alternative to consider, even for the future.

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