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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] x86/cpufreq: fix turbo mode detection

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86/cpufreq: fix turbo mode detection
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 07 May 2010 08:00:42 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 07 May 2010 00:02:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C808B113.136DB%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>
References: <4BE2FB6F02000078000019E5@xxxxxxxxxxxxxxxxxx> <C808B113.136DB%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 06.05.10 18:46 >>>
>On 06/05/2010 16:25, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
>>> Doesn't the fact that acpi_cpufreq_driver.getavg is a single global function
>>> pointer defeat the object of this patch? The effect of proper localised
>>> checking of cpuid_ecx(6) is still global.
>>> The check of cpuid_eax(6) yields a localised effect (on policy->turbo, where
>>> policy does appear to be per-cpu). But whether 'fixing' that but not
>>> properly the other is worthwhile, I'm not sure.
>> Yes, only one of the two were really an issue, but since I needed
>> to move part of this code around, I decided to move it all at once
>> in case later other bits (with non-global) meaning would get used.
>Yeah, but do cpuid_ecx(6) cross-cpu differences really not matter, or is it
>just that it has global effect so there was nothing more you could (easily)
>do? I mean, if that latter then the solution is really half-baked isn't it.
>And is half-baked worth doing?

Hmm, yes, this shouldn't be a global thing either. But perhaps for
this one it's better to set the function pointer globally if any CPU
supports the functionality, and then simply return an error from
the function if the individual CPU doesn't support it. I'll rev the
patch accordingly.


Xen-devel mailing list