From: Jacob Shin Subject: Re: [PATCH 1/2] cpufreq, powernow: enable/disable core performance boost for all cpus in policy Date: Wed, 19 Jun 2013 18:07:11 -0500 Message-ID: <20130619230711.GA14918@jshin-Toonie> References: <1371672887-1774-1-git-send-email-jacob.shin@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1371672887-1774-1-git-send-email-jacob.shin@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Liu Jinsong Cc: Suravee Suthikulanit , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Jun 19, 2013 at 03:14:46PM -0500, Jacob Shin wrote: > Currently, enable/disable turbo mode on AMD is broken: > > $ xenpm enable-turbo-mode 0 <-- works and proper CPU MSR bit is set > $ xenpm enable-turbo-mode 1 <-- silently broken, MSR bit not set > > Since ->turbo is per policy, when user requests to enable/disable > turbo mode, we need to set the bit in all of the ->cpus that this > policy affects. Sorry, I'll have to re-do this [PATCH 1/2], as it does not solve the problem on platforms with a separate policy per CPU. 1. We'll have to either globally enable/disable boost for all CPUs, or 2. [if there is a easy way to do so] find all Node siblings and set their bits and policy->turbo as well. [PATCH 2/2] is still valid. Thanks, > --- > xen/arch/x86/acpi/cpufreq/powernow.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c > index 2c9fea2..81ba17f 100644 > --- a/xen/arch/x86/acpi/cpufreq/powernow.c > +++ b/xen/arch/x86/acpi/cpufreq/powernow.c > @@ -85,7 +85,7 @@ static int powernow_cpufreq_update (int cpuid, > if (!cpumask_test_cpu(cpuid, &cpu_online_map)) > return -EINVAL; > > - on_selected_cpus(cpumask_of(cpuid), update_cpb, policy, 1); > + on_selected_cpus(policy->cpus, update_cpb, policy, 1); > > return 0; > } > -- > 1.7.9.5 >