From 7d4e405c93372a538ea996770c4b2713f9f060af Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Wed, 5 Dec 2001 01:57:16 +0000 Subject: 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. --- sys/arch/alpha/include/param.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sys/arch/alpha/include') diff --git a/sys/arch/alpha/include/param.h b/sys/arch/alpha/include/param.h index 611d1dbcff7..d291e572cbb 100644 --- a/sys/arch/alpha/include/param.h +++ b/sys/arch/alpha/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.20 2001/05/05 20:56:31 art Exp $ */ +/* $OpenBSD: param.h,v 1.21 2001/12/05 01:57:14 provos Exp $ */ /* $NetBSD: param.h,v 1.30 2000/06/09 16:03:04 thorpej Exp $ */ /* @@ -122,12 +122,11 @@ #endif /* - * Size of kernel malloc arena in CLBYTES-sized logical pages - */ -#ifndef NKMEMCLUSTERS -#define NKMEMCLUSTERS (32768*1024/NBPG) -#endif - + * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized + * logical pages. + */ +#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) /* pages ("clicks") to disk blocks */ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) -- cgit v1.2.3