summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/include/pmap.h5
-rw-r--r--sys/i386/include/pmap.h9
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index 22ec67c..df89589 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -101,9 +101,10 @@
((unsigned long)(l2) << PDRSHIFT) | \
((unsigned long)(l1) << PAGE_SHIFT))
-/* Initial number of kernel page tables */
+/* Initial number of kernel page tables. */
#ifndef NKPT
-#define NKPT 240 /* Enough for 16GB (2MB page tables) */
+/* 240 page tables needed to map 16G (120B "struct vm_page", 2M page tables). */
+#define NKPT 240
#endif
#define NKPML4E 1 /* number of kernel PML4 slots */
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index 6e757a6..996795f 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -98,14 +98,17 @@
*/
#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT)))
-/* Actual number of kernel page tables */
+/* Initial number of kernel page tables. */
#ifndef NKPT
#ifdef PAE
-#define NKPT 240 /* Enough for 16GB (2MB page tables) */
+/* 152 page tables needed to map 16G (76B "struct vm_page", 2M page tables). */
+#define NKPT 240
#else
-#define NKPT 30 /* Enough for 4GB (4MB page tables) */
+/* 18 page tables needed to map 4G (72B "struct vm_page", 4M page tables). */
+#define NKPT 30
#endif
#endif
+
#ifndef NKPDE
#ifdef SMP
#define NKPDE (KVA_PAGES - 1) /* number of page tables/pde's */
OpenPOWER on IntegriCloud