Re: [PATCH] Fix ppc64 max_pfn issue
From: Anton Blanchard
Date: Sat Jul 24 2004 - 10:45:59 EST
> I noticed excessive time in the pid hash functions on a ppc64 box. It
> turns out the pid hash is being sized way too small, eg on a 16GB box:
It turns out in the non NUMA case, max_low_pfn doesnt get initialised
until init_bootmem so we need to move initialisation of max_pfn below
it.
Signed-off-by: Anton Blanchard <anton@xxxxxxxxx>
diff -u linux-2.5/arch/ppc64/mm/init.c foobar2/arch/ppc64/mm/init.c
--- linux-2.5/arch/ppc64/mm/init.c 2004-07-25 00:40:04.263577944 +1000
+++ foobar2/arch/ppc64/mm/init.c 2004-07-25 01:32:48.030807187 +1000
@@ -533,8 +533,6 @@
unsigned long total_pages = lmb_end_of_DRAM() >> PAGE_SHIFT;
int boot_mapsize;
- max_pfn = max_low_pfn;
-
/*
* Find an area to use for the bootmem bitmap. Calculate the size of
* bitmap required as (Total Memory) / PAGE_SIZE / BITS_PER_BYTE.
@@ -547,6 +545,8 @@
boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages);
+ max_pfn = max_low_pfn;
+
/* add all physical memory to the bootmem map. Also find the first */
for (i=0; i < lmb.memory.cnt; i++) {
unsigned long physbase, size;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/