Messages in this thread Patch in this message | | | Date | Sun, 2 Apr 2006 00:26:23 +0530 | From | Srivatsa Vaddagiri <> | Subject | [PATCH 2.6.16-mm2 3/4] sched_domain: 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)
Patch below (against 2.6.16-mm2) has been boot tested on a non-NUMA/4-way SMP machine.
Signed-off-by: Srivatsa Vaddagiri <vatsa@in.ibm.com>
diff -puN kernel/sched.c~sd_usekmalloc_node kernel/sched.c --- linux-2.6.16-mm2/kernel/sched.c~sd_usekmalloc_node 2006-04-01 23:39:37.000000000 +0530 +++ linux-2.6.16-mm2-root/kernel/sched.c 2006-04-01 23:40:17.000000000 +0530 @@ -6263,7 +6263,7 @@ static int build_sched_domains(const cpu 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); @@ -6296,7 +6296,8 @@ static int build_sched_domains(const cpu 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); _
-- Regards, vatsa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |