aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-10-03 04:14:11 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:04:07 -0400
commitce164428c4cabfd284ca81913415cacd889aac33 (patch)
treeae4df00bc80285b03e755d615f41b4f96e5520ba /kernel/sched.c
parent0feaece97795c4c775a3c732c045706eda28d0e5 (diff)
[PATCH] scheduler: NUMA aware placement of sched_group_allnodes
When the per cpu sched domains are build then they also need to be placed on the node where the cpu resides otherwise we will have frequent off node accesses which will slow down the system. Signed-off-by: Christoph Lameter <clameter@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index fec97e4e196d..53608a59d6e3 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6349,9 +6349,10 @@ static int build_sched_domains(const cpumask_t *cpu_map)
6349 > SD_NODES_PER_DOMAIN*cpus_weight(nodemask)) { 6349 > SD_NODES_PER_DOMAIN*cpus_weight(nodemask)) {
6350 if (!sched_group_allnodes) { 6350 if (!sched_group_allnodes) {
6351 sched_group_allnodes 6351 sched_group_allnodes
6352 = kmalloc(sizeof(struct sched_group) 6352 = kmalloc_node(sizeof(struct sched_group)
6353 * MAX_NUMNODES, 6353 * MAX_NUMNODES,
6354 GFP_KERNEL); 6354 GFP_KERNEL,
6355 cpu_to_node(i));
6355 if (!sched_group_allnodes) { 6356 if (!sched_group_allnodes) {
6356 printk(KERN_WARNING 6357 printk(KERN_WARNING
6357 "Can not alloc allnodes sched group\n"); 6358 "Can not alloc allnodes sched group\n");