aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2007-12-27 16:45:39 +0000
committerAlan Cox <alc@FreeBSD.org>2007-12-27 16:45:39 +0000
commitb8e7fc24fe7ebc11bf82aa8c7421c3f53a4522dd (patch)
tree55ca53f4bcd6d131ca9394e3be1a58050a881ae4 /sys
parentb27aa20e8ddd6d8fdaf42185082108691990c1d4 (diff)
downloadsrc-b8e7fc24fe7ebc11bf82aa8c7421c3f53a4522dd.tar.gz
src-b8e7fc24fe7ebc11bf82aa8c7421c3f53a4522dd.zip
Add configuration knobs for the superpage reservation system. Initially,
the reservation will only be enabled on amd64.
Notes
Notes: svn path=/head/; revision=174938
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/include/vmparam.h14
-rw-r--r--sys/arm/include/vmparam.h7
-rw-r--r--sys/conf/options2
-rw-r--r--sys/i386/include/vmparam.h19
-rw-r--r--sys/ia64/include/vmparam.h7
-rw-r--r--sys/powerpc/include/vmparam.h7
-rw-r--r--sys/sparc64/include/vmparam.h7
-rw-r--r--sys/sun4v/include/vmparam.h7
8 files changed, 70 insertions, 0 deletions
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h
index 50962e5d0385..712b54b8f283 100644
--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -132,6 +132,20 @@
#define VM_NFREEORDER 13
/*
+ * Enable superpage reservations: 1 level.
+ */
+#ifndef VM_NRESERVLEVEL
+#define VM_NRESERVLEVEL 1
+#endif
+
+/*
+ * Level 0 reservations consist of 512 pages.
+ */
+#ifndef VM_LEVEL_0_ORDER
+#define VM_LEVEL_0_ORDER 9
+#endif
+
+/*
* Virtual addresses of things. Derived from the page directory and
* page table indexes from pmap.h for precision.
* Because of the page that is both a PD and PT, it looks a little
diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h
index 35b8d41954c5..a3d84252d01a 100644
--- a/sys/arm/include/vmparam.h
+++ b/sys/arm/include/vmparam.h
@@ -85,6 +85,13 @@
*/
#define VM_NFREEORDER 9
+/*
+ * Disable superpage reservations.
+ */
+#ifndef VM_NRESERVLEVEL
+#define VM_NRESERVLEVEL 0
+#endif
+
#define UPT_MAX_ADDRESS VADDR(UPTPTDI + 3, 0)
#define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0)
diff --git a/sys/conf/options b/sys/conf/options
index e76c61eb4dea..ea316454abc8 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -551,6 +551,8 @@ VFS_BIO_DEBUG opt_global.h
VM_KMEM_SIZE opt_vm.h
VM_KMEM_SIZE_SCALE opt_vm.h
VM_KMEM_SIZE_MAX opt_vm.h
+VM_NRESERVLEVEL opt_vm.h
+VM_LEVEL_0_ORDER opt_vm.h
NO_SWAPPING opt_vm.h
MALLOC_MAKE_FAILURES opt_vm.h
MALLOC_PROFILE opt_vm.h
diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h
index 2aa2848a1100..6ab27cc9c4ab 100644
--- a/sys/i386/include/vmparam.h
+++ b/sys/i386/include/vmparam.h
@@ -123,6 +123,25 @@
#endif
/*
+ * Disable superpage reservations.
+ */
+#ifndef VM_NRESERVLEVEL
+#define VM_NRESERVLEVEL 0
+#endif
+
+/*
+ * Level 0 reservations consist of 512 pages under PAE and 1024 pages
+ * otherwise.
+ */
+#ifndef VM_LEVEL_0_ORDER
+#ifdef PAE
+#define VM_LEVEL_0_ORDER 9
+#else
+#define VM_LEVEL_0_ORDER 10
+#endif
+#endif
+
+/*
* Kernel physical load address.
*/
#ifndef KERNLOAD
diff --git a/sys/ia64/include/vmparam.h b/sys/ia64/include/vmparam.h
index c7dac2c8e3d3..44ae5d8cb658 100644
--- a/sys/ia64/include/vmparam.h
+++ b/sys/ia64/include/vmparam.h
@@ -145,6 +145,13 @@
#define VM_NFREEORDER 16
/*
+ * Disable superpage reservations.
+ */
+#ifndef VM_NRESERVLEVEL
+#define VM_NRESERVLEVEL 0
+#endif
+
+/*
* Manipulating region bits of an address.
*/
#define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61)
diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h
index 0f8298e05c55..212624f984c9 100644
--- a/sys/powerpc/include/vmparam.h
+++ b/sys/powerpc/include/vmparam.h
@@ -131,6 +131,13 @@ struct pmap_physseg {
*/
#define VM_NFREEORDER 11
+/*
+ * Disable superpage reservations.
+ */
+#ifndef VM_NRESERVLEVEL
+#define VM_NRESERVLEVEL 0
+#endif
+
#ifndef VM_INITIAL_PAGEIN
#define VM_INITIAL_PAGEIN 16
#endif
diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h
index 5609e8e9ec11..0f1f37a92bed 100644
--- a/sys/sparc64/include/vmparam.h
+++ b/sys/sparc64/include/vmparam.h
@@ -122,6 +122,13 @@
#define VM_NFREEORDER 12
/*
+ * Disable superpage reservations.
+ */
+#ifndef VM_NRESERVLEVEL
+#define VM_NRESERVLEVEL 0
+#endif
+
+/*
* Address space layout.
*
* UltraSPARC I and II implement a 44 bit virtual address space. The address
diff --git a/sys/sun4v/include/vmparam.h b/sys/sun4v/include/vmparam.h
index a994401eb33a..61d4937f9b2e 100644
--- a/sys/sun4v/include/vmparam.h
+++ b/sys/sun4v/include/vmparam.h
@@ -122,6 +122,13 @@
#define VM_NFREEORDER 12
/*
+ * Disable superpage reservations.
+ */
+#ifndef VM_NRESERVLEVEL
+#define VM_NRESERVLEVEL 0
+#endif
+
+/*
* Address space layout.
*
* UltraSPARC I and II implement a 44 bit virtual address space. The address