Skip to content

Commit

Permalink
[PATCH] sched_domai: Use kmalloc_node
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Srivatsa Vaddagiri authored and Linus Torvalds committed Jun 28, 2006
1 parent d3a5aa9 commit 15f0b67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 15f0b67

Please sign in to comment.