diff options
author | Mike Travis <travis@sgi.com> | 2008-12-31 21:08:45 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-03 13:00:09 -0500 |
commit | 6ca09dfc9f180d038dcef93c167a833f43a8246f (patch) | |
tree | 48cd4e6530a7523d7d14d2c18fa7d3bd2ef49a4e /kernel/sched_rt.c | |
parent | 730cf27246225d56ca1603b2f3c4fdbf882d4e51 (diff) |
sched: put back some stack hog changes that were undone in kernel/sched.c
Impact: prevents panic from stack overflow on numa-capable machines.
Some of the "removal of stack hogs" changes in kernel/sched.c by using
node_to_cpumask_ptr were undone by the early cpumask API updates, and
causes a panic due to stack overflow. This patch undoes those changes
by using cpumask_of_node() which returns a 'const struct cpumask *'.
In addition, cpu_coregoup_map is replaced with cpu_coregroup_mask further
reducing stack usage. (Both of these updates removed 9 FIXME's!)
Also:
Pick up some remaining changes from the old 'cpumask_t' functions to
the new 'struct cpumask *' functions.
Optimize memory traffic by allocating each percpu local_cpu_mask on the
same node as the referring cpu.
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 833b6d44483c..954e1a81b796 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -1383,7 +1383,8 @@ static inline void init_sched_rt_class(void) | |||
1383 | unsigned int i; | 1383 | unsigned int i; |
1384 | 1384 | ||
1385 | for_each_possible_cpu(i) | 1385 | for_each_possible_cpu(i) |
1386 | alloc_cpumask_var(&per_cpu(local_cpu_mask, i), GFP_KERNEL); | 1386 | alloc_cpumask_var_node(&per_cpu(local_cpu_mask, i), |
1387 | GFP_KERNEL, cpu_to_node(i)); | ||
1387 | } | 1388 | } |
1388 | #endif /* CONFIG_SMP */ | 1389 | #endif /* CONFIG_SMP */ |
1389 | 1390 | ||