summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2004-09-11 01:31:26 +0000
committerscottl <scottl@FreeBSD.org>2004-09-11 01:31:26 +0000
commit136dd28a2e31cb12983cb49e4360be09330cfc86 (patch)
tree8fab6ea9b0f0a758bc3086fc7b316418d564d48a
parent0b9d78e27550c669ee1e17ffdc762b42418cbfd6 (diff)
downloadFreeBSD-src-136dd28a2e31cb12983cb49e4360be09330cfc86.zip
FreeBSD-src-136dd28a2e31cb12983cb49e4360be09330cfc86.tar.gz
Double the number of kernel page tables for amd64 and for i386/PAE. The old
value was only enough for 8GB of RAM, the new value can do 16GB. This still isn't optimal since it doesn't scale. Fixing this for amd64 looks to be fairly easy, but for i386 will be quite difficult. Reviewed by: peter
-rw-r--r--sys/amd64/include/pmap.h3
-rw-r--r--sys/i386/include/pmap.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index 15b91c9..3640e2f 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -97,8 +97,9 @@
((unsigned long)(l2) << PDRSHIFT) | \
((unsigned long)(l1) << PAGE_SHIFT))
+/* Initial number of kernel page tables */
#ifndef NKPT
-#define NKPT 120 /* initial number of kernel page tables */
+#define NKPT 240 /* Enough for 16GB (2MB page tables) */
#endif
#define NKPML4E 1 /* number of kernel PML4 slots */
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index 2378aa7..826c460 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -96,11 +96,12 @@
*/
#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT)))
+/* Actual number of kernel page tables */
#ifndef NKPT
#ifdef PAE
-#define NKPT 120 /* actual number of kernel page tables */
+#define NKPT 240 /* Enough for 16GB (2MB page tables) */
#else
-#define NKPT 30 /* actual number of kernel page tables */
+#define NKPT 30 /* Enough for 4GB (4MB page tables) */
#endif
#endif
#ifndef NKPDE
OpenPOWER on IntegriCloud