summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@in.ibm.com>2006-06-27 02:54:40 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 17:32:45 -0700
commit15f0b676a482fb4067cfe25de417c417dda3440a (patch)
tree29426196953a41d9cca0d81d501e76514ce820b2 /kernel/sched.c
parentd3a5aa9858cc9cecc3aadac7311d376c7c9e101a (diff)
downloadlinux-15f0b676a482fb4067cfe25de417c417dda3440a.tar.gz
linux-15f0b676a482fb4067cfe25de417c417dda3440a.tar.bz2
linux-15f0b676a482fb4067cfe25de417c417dda3440a.zip
[PATCH] sched_domai: Use kmalloc_node
The sched group structures used to represent various nodes need to be allocated from respective nodes (as suggested here also: http://uwsg.ucs.indiana.edu/hypermail/linux/kernel/0603.3/0051.html) Signed-off-by: Srivatsa Vaddagiri <vatsa@in.ibm.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com> 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index e93c75ffdc88..ee4211bd40c5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6022,7 +6022,7 @@ static int build_sched_domains(const cpumask_t *cpu_map)
domainspan = sched_domain_node_span(i);
cpus_and(domainspan, domainspan, *cpu_map);
- sg = kmalloc(sizeof(struct sched_group), GFP_KERNEL);
+ sg = kmalloc_node(sizeof(struct sched_group), GFP_KERNEL, i);
if (!sg) {
printk(KERN_WARNING "Can not alloc domain group for "
"node %d\n", i);
@@ -6055,7 +6055,8 @@ static int build_sched_domains(const cpumask_t *cpu_map)
if (cpus_empty(tmp))
continue;
- sg = kmalloc(sizeof(struct sched_group), GFP_KERNEL);
+ sg = kmalloc_node(sizeof(struct sched_group),
+ GFP_KERNEL, i);
if (!sg) {
printk(KERN_WARNING
"Can not alloc domain group for node %d\n", j);