Skip to contentSkip to conversation

node affine NUMA scheduler 4/5

PATCH New Erich Focht 1 participant 1 message Oct 14, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 node affine NUMA scheduler 4/5

---------- Resent Message ----------

Subject: [PATCH] node affine NUMA scheduler 4/5
Date: Fri, 11 Oct 2002 20:01:39 +0200

Ooops, this went out empty. It's so simple, anyway. Sorry...

Quoted 5 lines · Erich Focht

And here comes the fourth part...

Quoted 3 lines

04-alloc_on_homenode.patch :
Coupling with the memory allocator: for user tasks allocate memory from the homenode, no matter on which node the task is scheduled.

Erich

include/linux/gfp.h +5 -1
diff -urNp 2.5.39-disc-na/include/linux/gfp.h 2.5.39-disc-nac/include/linux/gfp.h
@@ -51,9 +51,13 @@ extern struct page * alloc_pages_node(in
  */
 static inline struct page * alloc_pages(unsigned int gfp_mask, unsigned int order)
 {
-	pg_data_t *pgdat = NODE_DATA(numa_node_id());
+	pg_data_t *pgdat;
 	unsigned int idx = (gfp_mask & GFP_ZONEMASK);
 
+	if (current->active_mm == &init_mm)
+		pgdat = NODE_DATA(numa_node_id());
+	else
+		pgdat = NODE_DATA(current->node);
 	if (unlikely(order >= MAX_ORDER))
 		return NULL;