]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix ppc64 max_pfn issue
authorAnton Blanchard <anton@samba.org>
Fri, 23 Jul 2004 15:18:59 +0000 (08:18 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 23 Jul 2004 15:18:59 +0000 (08:18 -0700)
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:

PID hash table entries: 16 (order 4: 256 bytes)

The reason is that the pid hash init function uses max_pfn before it was
setup on ppc64. With the following patch things are good again:

PID hash table entries: 4096 (order 12: 65536 bytes)

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc64/mm/init.c
arch/ppc64/mm/numa.c

index 857e8915ee89b2e88a67daed4d61715fbbaeab7e..0abb7c3efc238d9f2924915fdea9e6517772e7fd 100644 (file)
@@ -533,6 +533,8 @@ void __init do_init_bootmem(void)
        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.
@@ -629,7 +631,6 @@ void __init mem_init(void)
 
        num_physpages = max_low_pfn;    /* RAM is assumed contiguous */
        high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
-       max_pfn = max_low_pfn;
 
 #ifdef CONFIG_DISCONTIGMEM
 {
index 222120298ab8980bb495c86147d22eac596aa4c1..eb33136944c4032be721c6bacc54617db9c0ec54 100644 (file)
@@ -356,6 +356,7 @@ void __init do_init_bootmem(void)
 
        min_low_pfn = 0;
        max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
+       max_pfn = max_low_pfn;
 
        if (parse_numa_properties())
                setup_nonnuma();