Skip to content

Commit

Permalink
[PATCH] scheduler: NUMA aware placement of sched_group_allnodes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Oct 3, 2006
1 parent 0feaece commit ce16442
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6349,9 +6349,10 @@ static int build_sched_domains(const cpumask_t *cpu_map)
> SD_NODES_PER_DOMAIN*cpus_weight(nodemask)) {
if (!sched_group_allnodes) {
sched_group_allnodes
= kmalloc(sizeof(struct sched_group)
* MAX_NUMNODES,
GFP_KERNEL);
= kmalloc_node(sizeof(struct sched_group)
* MAX_NUMNODES,
GFP_KERNEL,
cpu_to_node(i));
if (!sched_group_allnodes) {
printk(KERN_WARNING
"Can not alloc allnodes sched group\n");
Expand Down

0 comments on commit ce16442

Please sign in to comment.