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: [PATCH] x86: unconditionally mark TSC unstable under

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Re: [PATCH] x86: unconditionally mark TSC unstable under Xen
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Thu, 15 Jul 2010 09:40:13 -0700 (PDT)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Jed Smith <jed@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Thu, 15 Jul 2010 09:42:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C3F37A5.9050606@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>
References: <51C8308F-F413-47AF-8845-C92BD36CA35C@xxxxxxxxxx> <4C3E2DCC.1010201@xxxxxxxx> <alpine.DEB.2.00.1007151656380.21432@kaball-desktop 4C3F37A5.9050606@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> From: Jeremy Fitzhardinge [mailto:jeremy@xxxxxxxx]
> Sent: Thursday, July 15, 2010 10:30 AM
> Subject: Re: [Xen-devel] Re: [PATCH] x86: unconditionally mark TSC
> unstable under Xen
> 
> On 07/15/2010 08:57 AM, Stefano Stabellini wrote:
> > On Wed, 14 Jul 2010, Jeremy Fitzhardinge wrote:
> >
> >> Subject: [PATCH] xen: disable xen_sched_clock by default
> >>
> >> xen_sched_clock only counts unstolen time.  In principle this should
> >> be useful to the Linux scheduler so that it knows how much time a
> process
> >> actually consumed.  But in practice this doesn't work very well as
> the
> >> scheduler expects the sched_clock time to be synchronized between
> >> cpus.  It also uses sched_clock to measure the time a task spends
> >> sleeping, in which case "unstolen time" isn't meaningful.
> >>
> >> So just use plain xen_clocksource_read to return wallclock
> nanoseconds
> >> for sched_clock.
> >>
> >>
> > I think that in this context is worth mentioning that
> > xen_clocksource_read ends up calling pvclock_get_nsec_offset that
> calls
> > native_read_tsc.
> 
> That's different.  That's not a general rdtsc, but a specific use of
> the tsc within the Xen clock ABI.  We know and expect that the raw tsc
> value could be dubious, but we also have the Xen-provided corrections to
> apply to it.

Sorry if I'm a bit behind on this...

Isn't the real problem that, in a PV guest, the cpuid instructions
that are testing the TSC-related CPUID bits are obtaining the actual
hardware value, rather than what Xen would like the guest to believe?
IOW, isn't the correct fix to use pvcpuid instead of cpuid when
xen_pvdomain() is true?

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