[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] RE: Saving/Restoring IA32_TSC_AUX MSR



> 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.