[PATCH] x86: 32bit numa increase max_elements to 1024

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, Andrew Morton <akpm@...>
Cc: linux-kernel@vger.kernel.org <linux-kernel@...>
Date: Sunday, June 1, 2008 - 1:51 am

so every element will repsent to 64M instead of 256M.

AMD opteron later based could have HW memory hole remapping. so could have
[0, 8g + 64M) on node0. reduce element size to 64M could keep that on node 0

later need to use find_e820_area to allocate memory_node_map like 64bit.
but need to move memory_present out of populate_mem_map...

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index 0c1a1bf..0ea4854 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -59,14 +59,14 @@ unsigned long node_end_pfn[MAX_NUMNODES] __read_mostly;
 /*
  * 4) physnode_map     - the mapping between a pfn and owning node
  * physnode_map keeps track of the physical memory layout of a generic
- * numa node on a 256Mb break (each element of the array will
- * represent 256Mb of memory and will be marked by the node id.  so,
+ * numa node on a 64Mb break (each element of the array will
+ * represent 64Mb of memory and will be marked by the node id.  so,
  * if the first gig is on node 0, and the second gig is on node 1
  * physnode_map will contain:
  *
- *     physnode_map[0-3] = 0;
- *     physnode_map[4-7] = 1;
- *     physnode_map[8- ] = -1;
+ *     physnode_map[0-15] = 0;
+ *     physnode_map[16-31] = 1;
+ *     physnode_map[32- ] = -1;
  */
 s8 physnode_map[MAX_ELEMENTS] __read_mostly = { [0 ... (MAX_ELEMENTS - 1)] = -1};
 EXPORT_SYMBOL(physnode_map);
@@ -81,9 +81,9 @@ void memory_present(int nid, unsigned long start, unsigned long end)
 	printk(KERN_DEBUG "  ");
 	for (pfn = start; pfn < end; pfn += PAGES_PER_ELEMENT) {
 		physnode_map[pfn / PAGES_PER_ELEMENT] = nid;
-		printk("%ld ", pfn);
+		printk(KERN_CONT "%ld ", pfn);
 	}
-	printk("\n");
+	printk(KERN_CONT "\n");
 }
 
 unsigned long node_memmap_size_bytes(int nid, unsigned long start_pfn,
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h
index faef751..ab00128 100644
--- a/include/asm-x86/mmzone_32.h
+++ b/include/asm-x86/mmzone_32.h
@@ -51,14 +51,14 @@ extern int early_pfn_to_nid(unsigned long pfn);
 /*
  * generic node memory support, the following assumptions apply:
  *
- * 1) memory comes in 256Mb contigious chunks which are either present or not
+ * 1) memory comes in 64Mb contigious chunks which are either present or not
  * 2) we will not have more than 64Gb in total
  *
  * for now assume that 64Gb is max amount of RAM for whole system
  *    64Gb / 4096bytes/page = 16777216 pages
  */
 #define MAX_NR_PAGES 16777216
-#define MAX_ELEMENTS 256
+#define MAX_ELEMENTS 1024
 #define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS)
 
 extern s8 physnode_map[];
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: make e820.c to have common functions, Yinghai Lu, (Sun May 11, 3:30 am)
[PATCH] x86: extend e820 ealy_res support 32bit, Yinghai Lu, (Sun May 18, 4:18 am)
[PATCH] x86: 32bit numa srat fix early_ioremap leak, Yinghai Lu, (Thu May 29, 7:25 pm)
[PATCH] x86: cleanup max_pfn_mapped usage - 64bit, Yinghai Lu, (Mon Jun 2, 2:55 am)
[PATCH] x86: cleanup max_pfn_mapped usage - 32bit, Yinghai Lu, (Mon Jun 2, 2:53 am)
[PATCH] x86: 32bit numa increase max_elements to 1024, Yinghai Lu, (Sun Jun 1, 1:51 am)
[PATCH] x86: numa_32 print out debug info all kva, Yinghai Lu, (Sun Jun 1, 1:56 am)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Thomas Gleixner, (Tue May 27, 11:44 am)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Tue May 27, 4:37 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Tue May 27, 5:22 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Tue May 27, 5:47 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Wed May 28, 6:01 am)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Thu May 29, 9:37 am)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Fri May 30, 11:50 am)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Wed May 28, 5:24 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Thomas Gleixner, (Tue May 27, 4:58 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2, Jeremy Fitzhardinge, (Tue May 27, 5:06 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix v2, Jeremy Fitzhardinge, (Sat May 24, 4:54 am)
[PATCH] xen: boot via i386_start_kernel to get early reserva..., Jeremy Fitzhardinge, (Sat May 24, 5:49 am)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix v2, Jeremy Fitzhardinge, (Fri May 23, 7:38 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix v2, Jeremy Fitzhardinge, (Fri May 23, 7:32 pm)
Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix, Jeremy Fitzhardinge, (Thu May 22, 6:12 am)
[PATCH] x86: move e820_mark_nosave_regions to e820.c, Yinghai Lu, (Tue May 20, 11:10 pm)
Re: [PATCH] x86: make e820.c to have common functions, Ingo Molnar, (Tue May 13, 9:05 am)