cpumask: use alloc_cpumask_var_node where appropriate
Impact: Reduce inter-node memory traffic. Reduces inter-node memory traffic (offloading the global system bus) by allocating referenced struct cpumasks on the same node as the referring struct. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@ -547,8 +547,9 @@ static int __init acpi_cpufreq_early_init(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
for_each_possible_cpu(i) {
|
||||
if (!alloc_cpumask_var(&per_cpu_ptr(acpi_perf_data, i)
|
||||
->shared_cpu_map, GFP_KERNEL)) {
|
||||
if (!alloc_cpumask_var_node(
|
||||
&per_cpu_ptr(acpi_perf_data, i)->shared_cpu_map,
|
||||
GFP_KERNEL, cpu_to_node(i))) {
|
||||
|
||||
/* Freeing a NULL pointer is OK: alloc_percpu zeroes. */
|
||||
free_acpi_perf_data();
|
||||
|
Reference in New Issue
Block a user