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: Saving/Restoring IA32_TSC_AUX MSR

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] RE: Saving/Restoring IA32_TSC_AUX MSR
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Fri, 11 Dec 2009 10:35:38 -0800 (PST)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Dugger, Donald D" <donald.d.dugger@xxxxxxxxx>, "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Delivery-date: Fri, 11 Dec 2009 10:37:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B228D7B.709@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
> However, the vcpu number is definitely useful to usermode 
> apps, so they 
> can get some idea how they're moved between (v)cpus.  I don't 
> think it 
> will matter to them that it isn't pcpu.

My point is that an app running on native Linux can
safely assume that, if TSC_AUX==3 at time T1 and
TSC_AUX is still 3 at time T2,it is running
on the same processor and the same node at both T1
and T2.  In a virtual environment it cannot even
assume it is running on the same machine.
Further if the app sees that TSC_AUX==2 at time T3
and TSC_AUX==3 at time T4, on native Linux it
can safely assume that it is running on a different
processor.  While rarer, in a virtual environment,
this may also be a false assumption.

That's why I say the information is misleading.

> -----Original Message-----
> From: Jeremy Fitzhardinge [mailto:jeremy@xxxxxxxx]
> Sent: Friday, December 11, 2009 11:21 AM
> To: Dan Magenheimer
> Cc: Keir Fraser; Zhang, Xiantao; Xu, Dongxiao; Nakajima, Jun;
> xen-devel@xxxxxxxxxxxxxxxxxxx; Dugger, Donald D
> Subject: Re: [Xen-devel] RE: Saving/Restoring IA32_TSC_AUX MSR
> 
> 
> On 12/11/09 07:09, Dan Magenheimer wrote:
> >> As I know, RDTSCP can used to implment fast vgetcpu in
> >> newer Linux kernel.
> >>      
> > Yes, but code which uses fast vgetcpu is expecting
> > to get physical cpu and physical node number.  Since
> > an HVM guest OS only has access to virtual cpu and
> > virtual node number, the information written to TSC_AUX
> > by a guest OS is misleading and may silently break any
> > userland code that assumes it is getting physical
> > information.
> >    
> 
> It will fall back to using the segment limit trick to get vcpu+vnode 
> info if rdtscp isn't available, so they'll get the info either way.
> 
> It's not clear how many apps make good use of the numa node info, but 
> presumably some do.  So long as the virtual numa info bears 
> some vague 
> resemblance to the real topology then they could still make 
> use of it in 
> a Xen domain.  Whether or not Xen currently implements that is a 
> separate question.
> 
> However, the vcpu number is definitely useful to usermode 
> apps, so they 
> can get some idea how they're moved between (v)cpus.  I don't 
> think it 
> will matter to them that it isn't pcpu.
> 
>      J
>

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

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