diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-09-12 23:05:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-09-12 23:05:07 +0000 |
commit | 78151583cdbf7fec9bd8ed3de542bdb1dc8983f4 (patch) | |
tree | d5400b809ffedc93752432bae7ac65f8cdfc56c7 /sys/arch | |
parent | 096dc2b114f3ad0390816a8c4a1af3fb2c427c75 (diff) |
Change the NKMEMPAGES range to 4-64MB for 32bit arches, and 8-128MB for 64bit
arches; except on sparc where the range is 4-8 for !sun4m and 4-64 for sun4m,
selected at runtime.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/hp300/include/param.h | 9 | ||||
-rw-r--r-- | sys/arch/hppa64/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/m68k/include/param.h | 9 | ||||
-rw-r--r-- | sys/arch/m88k/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/mac68k/include/param.h | 9 | ||||
-rw-r--r-- | sys/arch/macppc/include/param.h | 10 | ||||
-rw-r--r-- | sys/arch/mips64/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/param.h | 9 | ||||
-rw-r--r-- | sys/arch/mvmeppc/include/param.h | 14 | ||||
-rw-r--r-- | sys/arch/powerpc/include/param.h | 9 | ||||
-rw-r--r-- | sys/arch/solbourne/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/include/param.h | 7 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/autoconf.c | 13 | ||||
-rw-r--r-- | sys/arch/sparc64/include/param.h | 4 |
15 files changed, 52 insertions, 67 deletions
diff --git a/sys/arch/arm/include/param.h b/sys/arch/arm/include/param.h index ae2849e7139..e15b515f22b 100644 --- a/sys/arch/arm/include/param.h +++ b/sys/arch/arm/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.6 2005/07/31 15:31:12 miod Exp $ */ +/* $OpenBSD: param.h,v 1.7 2005/09/12 23:05:03 miod Exp $ */ /* $NetBSD: param.h,v 1.9 2002/03/24 03:37:23 thorpej Exp $ */ /* @@ -65,8 +65,8 @@ * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized * logical pages. */ -#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((7 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT) /* Constants used to divide the USPACE area */ diff --git a/sys/arch/hp300/include/param.h b/sys/arch/hp300/include/param.h index 20e3a05a658..502bd44ea0f 100644 --- a/sys/arch/hp300/include/param.h +++ b/sys/arch/hp300/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.23 2003/06/02 23:27:45 millert Exp $ */ +/* $OpenBSD: param.h,v 1.24 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: param.h,v 1.35 1997/07/10 08:22:38 veego Exp $ */ /* @@ -65,13 +65,6 @@ #define NPTEPG (NBPG/(sizeof (pt_entry_t))) -/* - * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized - * logical pages. - */ -#define NKMEMPAGES_MIN_DEFAULT ((2 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((2 * 1024 * 1024) >> PAGE_SHIFT) - #define MSGBUFSIZE 4096 #if defined(_KERNEL) && !defined(_LOCORE) diff --git a/sys/arch/hppa64/include/param.h b/sys/arch/hppa64/include/param.h index d06caf51653..2fe2d417f37 100644 --- a/sys/arch/hppa64/include/param.h +++ b/sys/arch/hppa64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.2 2005/07/31 15:31:13 miod Exp $ */ +/* $OpenBSD: param.h,v 1.3 2005/09/12 23:05:05 miod Exp $ */ /* * Copyright (c) 1988-1994, The University of Utah and @@ -86,8 +86,8 @@ * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized * logical pages. */ -#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) /* pages ("clicks") (4096 bytes) to disk blocks */ #define ctod(x) ((x) << (PAGE_SHIFT - DEV_BSHIFT)) diff --git a/sys/arch/m68k/include/param.h b/sys/arch/m68k/include/param.h index 6f76e898fde..f5fe631af62 100644 --- a/sys/arch/m68k/include/param.h +++ b/sys/arch/m68k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.12 2005/09/12 09:59:51 martin Exp $ */ +/* $OpenBSD: param.h,v 1.13 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: param.h,v 1.2 1997/06/10 18:21:23 veego Exp $ */ /* @@ -92,6 +92,13 @@ #define USPACE_ALIGN (0) /* u-area alignment 0-none */ /* + * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized + * logical pages. + */ +#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT) + +/* * Constants related to network buffer management. * MCLBYTES must be no larger than CLBYTES (the software page size), and, * on machines that exchange pages of input or output buffers with mbuf diff --git a/sys/arch/m88k/include/param.h b/sys/arch/m88k/include/param.h index 5e537ffdad6..c86f46cbc6e 100644 --- a/sys/arch/m88k/include/param.h +++ b/sys/arch/m88k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.5 2005/07/31 15:31:14 miod Exp $ */ +/* $OpenBSD: param.h,v 1.6 2005/09/12 23:05:05 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1988 University of Utah. @@ -102,7 +102,7 @@ * logical pages. */ #define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT) #define MSGBUFSIZE PAGE_SIZE diff --git a/sys/arch/mac68k/include/param.h b/sys/arch/mac68k/include/param.h index 21a71052091..0f9ecba6180 100644 --- a/sys/arch/mac68k/include/param.h +++ b/sys/arch/mac68k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.19 2003/06/02 23:27:49 millert Exp $ */ +/* $OpenBSD: param.h,v 1.20 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: param.h,v 1.28 1997/03/01 06:57:45 scottr Exp $ */ /* @@ -100,13 +100,6 @@ #define NPTEPG (NBPG/(sizeof (pt_entry_t))) -/* - * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized - * logical pages. - */ -#define NKMEMPAGES_MIN_DEFAULT ((3 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((3 * 1024 * 1024) >> PAGE_SHIFT) - #define MSGBUFSIZE 4096 #if defined(_KERNEL) && !defined(_LOCORE) diff --git a/sys/arch/macppc/include/param.h b/sys/arch/macppc/include/param.h index f47602547e9..709e1de4486 100644 --- a/sys/arch/macppc/include/param.h +++ b/sys/arch/macppc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.3 2001/12/05 17:08:32 drahn Exp $ */ +/* $OpenBSD: param.h,v 1.4 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -49,11 +49,3 @@ #define KERNBASE 0x100000 #define MSGBUFSIZE (NBPG*2) - -/* - * 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 ((16 * 1024 * 1024) >> PAGE_SHIFT) - diff --git a/sys/arch/mips64/include/param.h b/sys/arch/mips64/include/param.h index 6aaf7549419..ab0ce4b99af 100644 --- a/sys/arch/mips64/include/param.h +++ b/sys/arch/mips64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.8 2005/08/07 07:29:44 miod Exp $ */ +/* $OpenBSD: param.h,v 1.9 2005/09/12 23:05:05 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -112,7 +112,7 @@ /* Default malloc arena size */ #define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) /* pages ("clicks") (4096 bytes) to disk blocks */ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) diff --git a/sys/arch/mvme68k/include/param.h b/sys/arch/mvme68k/include/param.h index 626a20c5c88..c7a54728588 100644 --- a/sys/arch/mvme68k/include/param.h +++ b/sys/arch/mvme68k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.19 2003/06/02 23:27:50 millert Exp $ */ +/* $OpenBSD: param.h,v 1.20 2005/09/12 23:05:05 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -61,13 +61,6 @@ #include <m68k/param.h> /* - * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized - * logical pages. - */ -#define NKMEMPAGES_MIN_DEFAULT ((2 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((2 * 1024 * 1024) >> PAGE_SHIFT) - -/* * spl functions; all but spl0 are done in-line */ #include <machine/psl.h> diff --git a/sys/arch/mvmeppc/include/param.h b/sys/arch/mvmeppc/include/param.h index 6505b73ddc8..e10f2bae165 100644 --- a/sys/arch/mvmeppc/include/param.h +++ b/sys/arch/mvmeppc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.4 2001/12/05 01:57:15 provos Exp $ */ +/* $OpenBSD: param.h,v 1.5 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -49,15 +49,3 @@ #define KERNBASE 0x100000 #define MSGBUFSIZE (NBPG*2) - -/* - * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized - * logical pages. - */ -#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 - diff --git a/sys/arch/powerpc/include/param.h b/sys/arch/powerpc/include/param.h index 75c62bc7a40..e733b223c3d 100644 --- a/sys/arch/powerpc/include/param.h +++ b/sys/arch/powerpc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.25 2004/08/06 22:31:31 mickey Exp $ */ +/* $OpenBSD: param.h,v 1.26 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -70,6 +70,13 @@ #define USPACE_ALIGN (0) /* u-area alignment 0-none */ /* + * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized + * logical pages. + */ +#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT) + +/* * Constants related to network buffer management. * MCLBYTES must be no larger than the software page size, and, * on machines that exchange pages of input or output buffers with mbuf diff --git a/sys/arch/solbourne/include/param.h b/sys/arch/solbourne/include/param.h index 2b9a9b92425..fce54c30d5a 100644 --- a/sys/arch/solbourne/include/param.h +++ b/sys/arch/solbourne/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.2 2005/07/31 15:31:16 miod Exp $ */ +/* $OpenBSD: param.h,v 1.3 2005/09/12 23:05:05 miod Exp $ */ /* OpenBSD: param.h,v 1.29 2004/08/06 22:31:31 mickey Exp */ /* @@ -105,8 +105,8 @@ * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized * logical pages. */ -#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT) /* pages ("clicks") to disk blocks */ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) diff --git a/sys/arch/sparc/include/param.h b/sys/arch/sparc/include/param.h index 1063d837476..5987f2050c6 100644 --- a/sys/arch/sparc/include/param.h +++ b/sys/arch/sparc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.30 2005/07/31 15:31:17 miod Exp $ */ +/* $OpenBSD: param.h,v 1.31 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: param.h,v 1.29 1997/03/10 22:50:37 pk Exp $ */ /* @@ -109,8 +109,9 @@ * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized * logical pages. */ -#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_DEFAULT_SUN4M ((64 * 1024 * 1024) >> PAGE_SHIFT) /* pages ("clicks") to disk blocks */ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 357ef31b836..351c267fbb6 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.67 2005/05/01 18:15:46 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.68 2005/09/12 23:05:05 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -221,6 +221,17 @@ bootstrap() ddb_init(); #endif +#if defined(SUN4M) + /* + * Allow a larger kernel malloc space on sun4m. + */ + if (CPU_ISSUN4M) { + extern u_int nkmempages_max; + + nkmempages_max = NKMEMPAGES_MAX_DEFAULT_SUN4M; + } +#endif + /* * On sun4ms we have to do some nasty stuff here. We need to map * in the interrupt registers (since we need to find out where diff --git a/sys/arch/sparc64/include/param.h b/sys/arch/sparc64/include/param.h index d9927ce3924..a08ae38c613 100644 --- a/sys/arch/sparc64/include/param.h +++ b/sys/arch/sparc64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.17 2005/09/08 15:25:55 martin Exp $ */ +/* $OpenBSD: param.h,v 1.18 2005/09/12 23:05:06 miod Exp $ */ /* $NetBSD: param.h,v 1.25 2001/05/30 12:28:51 mrg Exp $ */ /* @@ -191,7 +191,7 @@ extern int nbpg, pgofset, pgshift; * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized * logical pages. */ -#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) #define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) /* pages ("clicks") to disk blocks */ |