[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V2 2/2] cpufreq, powernow: enable/disable core performance boost for all CPUs in the Node
Since disabling turbo mode on one CPU also affect all other sibling CPUs in the same Node, we need to call update_cpb on all CPUs in the same node. Signed-off-by: Jacob Shin <jacob.shin@xxxxxxx> --- xen/arch/x86/acpi/cpufreq/powernow.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c index 2c9fea2..3b5507a 100644 --- a/xen/arch/x86/acpi/cpufreq/powernow.c +++ b/xen/arch/x86/acpi/cpufreq/powernow.c @@ -29,6 +29,7 @@ #include <xen/cpumask.h> #include <xen/timer.h> #include <xen/xmalloc.h> +#include <xen/numa.h> #include <asm/bug.h> #include <asm/msr.h> #include <asm/io.h> @@ -82,10 +83,20 @@ static void update_cpb(void *data) static int powernow_cpufreq_update (int cpuid, struct cpufreq_policy *policy) { - if (!cpumask_test_cpu(cpuid, &cpu_online_map)) - return -EINVAL; - - on_selected_cpus(cpumask_of(cpuid), update_cpb, policy, 1); + unsigned int cpu; + cpumask_t cpus; + + cpumask_and(&cpus, &cpu_online_map, &node_to_cpumask[cpu_to_node[cpuid]]); + on_selected_cpus(&cpus, update_cpb, policy, 1); + + if (!cpumask_equal(policy->cpus, &cpus)) { + ASSERT(cpumask_subset(policy->cpus, &cpus)); + for_each_cpu(cpu, &cpus) { + struct cpufreq_policy *p; + p = per_cpu(cpufreq_cpu_policy, cpu); + p->turbo = policy->turbo; + } + } return 0; } -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |