linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scheduler: NUMA aware placement of sched_group_allnodes
@ 2006-09-16 18:18 Christoph Lameter
  0 siblings, 0 replies; only message in thread
From: Christoph Lameter @ 2006-09-16 18:18 UTC (permalink / raw)
  To: akpm; +Cc: npiggin, linux-mm

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>

Index: linux-2.6.18-rc6-mm2/kernel/sched.c
===================================================================
--- linux-2.6.18-rc6-mm2.orig/kernel/sched.c	2006-09-13 20:00:48.000000000 -0500
+++ linux-2.6.18-rc6-mm2/kernel/sched.c	2006-09-15 13:05:32.269416181 -0500
@@ -6449,9 +6449,10 @@ static int build_sched_domains(const cpu
 				> 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");

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-16 18:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-16 18:18 [PATCH] scheduler: NUMA aware placement of sched_group_allnodes Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox