summaryrefslogtreecommitdiff
path: root/sys/arch/mvmeppc
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2001-12-05 01:57:16 +0000
committerNiels Provos <provos@cvs.openbsd.org>2001-12-05 01:57:16 +0000
commit7d4e405c93372a538ea996770c4b2713f9f060af (patch)
tree6cd29f566d8ce4e0b98c833eb388e60be4873329 /sys/arch/mvmeppc
parent0a184a866038ed50ac9395e288f697c8ad216309 (diff)
make nkmempages dynamic based on memory. okay art@ from netbsd:
date: 2000/02/11 19:22:52; author: thorpej; Add some very simple code to auto-size the kmem_map. We take the amount of physical memory, divide it by 4, and then allow machine dependent code to place upper and lower bounds on the size. Export the computed value to userspace via the new "vm.nkmempages" sysctl. NKMEMCLUSTERS is now deprecated and will generate an error if you attempt to use it. The new option, should you choose to use it, is called NKMEMPAGES, and two new options NKMEMPAGES_MIN and NKMEMPAGES_MAX allow the user to configure the bounds in the kernel config file.
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r--sys/arch/mvmeppc/include/param.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/mvmeppc/include/param.h b/sys/arch/mvmeppc/include/param.h
index 1cab89fcd14..6505b73ddc8 100644
--- a/sys/arch/mvmeppc/include/param.h
+++ b/sys/arch/mvmeppc/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.3 2001/09/02 19:40:24 miod Exp $ */
+/* $OpenBSD: param.h,v 1.4 2001/12/05 01:57:15 provos Exp $ */
/* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */
/*-
@@ -51,9 +51,13 @@
#define MSGBUFSIZE (NBPG*2)
/*
- * Size of kernel malloc arena in logical pages.
+ * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
+ * logical pages.
*/
-#ifndef NKMEMCLUSTERS
-#define NKMEMCLUSTERS (16 * 1024 * 1024 / PAGE_SIZE)
+#ifndef NKMEMPAGES_MIN_DEFAULT
+#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT)
+#endif
+#ifndef NKMEMPAGES_MAX_DEFAULT
+#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT)
#endif