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: pvclock in userland (reprise)

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Subject: [Xen-devel] RE: pvclock in userland (reprise)
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Thu, 17 Sep 2009 12:45:07 -0700 (PDT)
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Dugger, Donald D" <donald.d.dugger@xxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Thu, 17 Sep 2009 12:45:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AB28CDE.4020208@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 09/17/09 12:13, Nakajima, Jun wrote:
> > Maybe you can write a device driver in the guest that sets 
> up mapping against the (virtual) physical memory, then use 
> mmap() in the app?
> 
> Dan is trying to avoid making guest kernel changes, on the 
> grounds that
> waiting for enterprise distros to catch up would take too long.

Well, as I've said all along, a driver in a dynamically loadable
module is OK.  Whether sensible or not, customers don't seem to
care about that, they only care if you change the kernel bits
that gets loaded.

> Once you're making kernel changes then you can update the pvclock
> mechanism to use the xen clock algorithm, obviating the need for
> usermode ABI changes.

Is that working yet (fast vsyscall under Xen)? >:-)

> However, if its really the case that the tsc is guaranteed 
> synchronized,
> then the guest can determine that for itself by looking at 
> cpuid and/or
> /proc/cpuinfo (and presumably doing some sanity checking) and 
> then just
> directly use rdtsc, with no need to change either Xen or the kernel.

That's exactly what the app is doing when on bare metal.

But in virtual unless it gets some kind of notification on
migration (which would be cool, but would also require
kernel changes?), it can't determine the appropriate
scaling factor and offset, or that they need to change.
(The userland pvclock algorithm would need to keep
a version indicator just like the kernel pvclock does.)
So that's what the userland-accessible shared page
is needed for.

Dan

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