mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [7/9] NUMA-Q: allocate pgdats from node-local memory
@ 2002-11-12  2:20 William Lee Irwin III
  0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-11-12  2:20 UTC (permalink / raw)
  To: linux-kernel

This changes allocate_pgdat() to hand back virtual addresses of pgdats
from the start of node_remap_start_vaddr[nid].

 discontig.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


diff -urpN 05_memmap_after/arch/i386/mm/discontig.c 06_alloc_virtual/arch/i386/mm/discontig.c
--- 05_memmap_after/arch/i386/mm/discontig.c	2002-11-11 16:37:14.000000000 -0800
+++ 06_alloc_virtual/arch/i386/mm/discontig.c	2002-11-11 16:43:30.000000000 -0800
@@ -73,13 +73,13 @@ static void __init find_max_pfn_node(int
  */
 static void __init allocate_pgdat(int nid)
 {
-	unsigned long node_datasz;
-
-	node_datasz = PFN_UP(sizeof(struct pglist_data));
-	NODE_DATA(nid) = (pg_data_t *)(__va(min_low_pfn << PAGE_SHIFT));
-	min_low_pfn += node_datasz;
-	if (!nid)
+	if (nid)
+		NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid];
+	else {
+		NODE_DATA(nid) = (pg_data_t *)(__va(min_low_pfn << PAGE_SHIFT));
+		min_low_pfn += PFN_UP(sizeof(pg_data_t));
 		memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
+	}
 }
 
 /*

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

only message in thread, other threads:[~2002-11-12  2:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-12  2:20 [7/9] NUMA-Q: allocate pgdats from node-local memory William Lee Irwin III

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

all inboxes | Powered by JetHome®