Skip to contentSkip to conversation

NUMA-Q: reserve a larger virtual region

PATCH New William Lee Irwin III 1 participant 1 message Nov 12, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 5/9 NUMA-Q: reserve a larger virtual region

This increases the size of the virtually remapped region so it is large enough to hold the pg_data_t's in addition to the local memory maps.

 discontig.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/i386/mm/discontig.c +1 -1
diff -urpN 03_late_alloc/arch/i386/mm/discontig.c 04_larger_remap/arch/i386/mm/discontig.c
@@ -146,7 +146,7 @@ static unsigned long calculate_numa_rema
 	for (nid = 1; nid < numnodes; nid++) {
 		/* calculate the size of the mem_map needed in bytes */
 		size = (node_end_pfn[nid] - node_start_pfn[nid] + 1) 
-			* sizeof(struct page);
+			* sizeof(struct page) + sizeof(pg_data_t);
 		/* convert size to large (pmd size) pages, rounding up */
 		size = (size + LARGE_PAGE_BYTES - 1) / LARGE_PAGE_BYTES;
 		/* now the roundup is correct, convert to PAGE_SIZE pages */