aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorNick Piggin <nickpiggin@yahoo.com.au>2004-08-30 20:35:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-30 20:35:49 -0700
commit2c05d9eb31eac02a105f2b05c144272f8b382864 (patch)
tree0f89e12ad1824ae293c2cdead03912f810c7c89b /mm
parent497c9d6819e984f737ff51489258f213e193d52e (diff)
downloadhistory-2c05d9eb31eac02a105f2b05c144272f8b382864.tar.gz
[PATCH] fix PID hash sizing
A 4GB, 4-way Opteron would create the smallest size table (16 entries) because pidhash_init is called before mem_init which is where x86-64 sets up max_pfn. nr_kernel_pages is setup by paging_init, called from setup_arch, which is also where i386 sets up max_pfn. So export nr_kernel_pages, nr_all_pages. Use nr_kernel_pages when sizing the PID hash. This fixes the problem. This also makes the pid hash dependant on the size of ZONE_NORMAL instead of total size of memory. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ce877b9e223e6d..327f35787fe26d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -55,8 +55,8 @@ EXPORT_SYMBOL(zone_table);
static char *zone_names[MAX_NR_ZONES] = { "DMA", "Normal", "HighMem" };
int min_free_kbytes = 1024;
-static unsigned long __initdata nr_kernel_pages;
-static unsigned long __initdata nr_all_pages;
+unsigned long __initdata nr_kernel_pages;
+unsigned long __initdata nr_all_pages;
/*
* Temporary debugging check for pages not lying within a given zone.