diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-13 14:49:53 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-13 14:49:53 +1030 |
commit | c032ef60d1aa9af33730b7a35bbea751b131adc1 (patch) | |
tree | 3c3a274c92d29383f1d6b07ab098666d3525a251 /arch/x86/mm/numa_64.c | |
parent | 71ee73e72228775a076a502b3c92028fa59e2889 (diff) | |
download | talos-obmc-linux-c032ef60d1aa9af33730b7a35bbea751b131adc1.tar.gz talos-obmc-linux-c032ef60d1aa9af33730b7a35bbea751b131adc1.zip |
cpumask: convert node_to_cpumask_map[] to cpumask_var_t
Impact: reduce kernel memory usage when CONFIG_CPUMASK_OFFSTACK=y
Straightforward conversion: done for 32 and 64 bit kernels.
node_to_cpumask_map is now a cpumask_var_t array.
64-bit used to be a dynamic cpumask_t array, and 32-bit used to be a
static cpumask_t array.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/mm/numa_64.c')
-rw-r--r-- | arch/x86/mm/numa_64.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index eee149078862..9d2b3d2625cd 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c @@ -681,12 +681,12 @@ void __cpuinit numa_clear_node(int cpu) void __cpuinit numa_add_cpu(int cpu) { - cpu_set(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); + cpumask_set_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); } void __cpuinit numa_remove_cpu(int cpu) { - cpu_clear(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); + cpumask_clear_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); } #else /* CONFIG_DEBUG_PER_CPU_MAPS */ @@ -700,17 +700,17 @@ static void __cpuinit numa_set_cpumask(int cpu, int enable) cpumask_t *mask; char buf[64]; - if (node_to_cpumask_map == NULL) { - printk(KERN_ERR "node_to_cpumask_map NULL\n"); + mask = node_to_cpumask_map[node]; + if (mask == NULL) { + printk(KERN_ERR "node_to_cpumask_map[%i] NULL\n", node); dump_stack(); return; } - mask = &node_to_cpumask_map[node]; if (enable) - cpu_set(cpu, *mask); + cpumask_set_cpu(cpu, mask); else - cpu_clear(cpu, *mask); + cpumask_clear_cpu(cpu, mask); cpulist_scnprintf(buf, sizeof(buf), mask); printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n", |