summaryrefslogtreecommitdiff
path: root/sys/arch/sun3
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>2002-02-17 22:59:54 +0000
committerMats O Jansson <maja@cvs.openbsd.org>2002-02-17 22:59:54 +0000
commit7beb673ee2a6f26cb92ffbcee12d36dd3f705fd8 (patch)
treef241a99972126accf4f3a3e5afc119bb3b5e7109 /sys/arch/sun3
parente59357f842efb4b5301b194970688e1d2da24d97 (diff)
Patch from Daniel Lucq <daniel@lucq.org>
The patch allows you to change the value of NMBCLUSTERS, BUFCACHEPERCENT and NKMEMPAGES using the config command, instead of recompiling the kernel. This is the kernel part of the patch. I have compiled it on i386, sparc64, alpha and macppc. -moj ok art@ maja@
Diffstat (limited to 'sys/arch/sun3')
-rw-r--r--sys/arch/sun3/include/vmparam.h3
-rw-r--r--sys/arch/sun3/sun3/machdep.c12
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/sun3/include/vmparam.h b/sys/arch/sun3/include/vmparam.h
index 1245f46419a..78616964d7a 100644
--- a/sys/arch/sun3/include/vmparam.h
+++ b/sys/arch/sun3/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.10 2001/12/05 16:25:44 art Exp $ */
+/* $OpenBSD: vmparam.h,v 1.11 2002/02/17 22:59:53 maja Exp $ */
/* $NetBSD: vmparam.h,v 1.14 1995/09/26 04:02:10 gwr Exp $ */
/*
@@ -134,7 +134,6 @@
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0x0FE00000)
/* virtual sizes (bytes) for various kernel submaps */
-#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
#define VM_PHYSSEG_MAX 4
diff --git a/sys/arch/sun3/sun3/machdep.c b/sys/arch/sun3/sun3/machdep.c
index 09f075f3515..00c3a9ebb93 100644
--- a/sys/arch/sun3/sun3/machdep.c
+++ b/sys/arch/sun3/sun3/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.50 2002/01/23 17:51:52 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.51 2002/02/17 22:59:53 maja Exp $ */
/* $NetBSD: machdep.c,v 1.77 1996/10/13 03:47:51 christos Exp $ */
/*
@@ -110,6 +110,10 @@ struct vm_map *phys_map = NULL;
*/
int safepri = PSL_LOWIPL;
+#ifndef BUFCACHEPERCENT
+#define BUFCACHEPERCENT 5
+#endif
+
/*
* Declare these as initialized data so we can patch them.
*/
@@ -123,6 +127,7 @@ int bufpages = BUFPAGES;
#else
int bufpages = 0;
#endif
+int bufcachepercent = BUFCACHEPERCENT;
static caddr_t allocsys __P((caddr_t));
static void identifycpu __P((void));
@@ -195,9 +200,6 @@ allocsys(v)
valloc(msqids, struct msqid_ds, msginfo.msgmni);
#endif
-#ifndef BUFCACHEPERCENT
-#define BUFCACHEPERCENT 5
-#endif
/*
* Determine how many buffers to allocate. By default we allocate
* the BSD standard of use 10% of memory for the first 2 Meg,
@@ -210,7 +212,7 @@ allocsys(v)
if (bufpages == 0) {
/* We always have more than 2MB of memory. */
bufpages = (btoc(2 * 1024 * 1024) + physmem) *
- BUFCACHEPERCENT / 100;
+ bufcachepercent / 100;
}
if (nbuf == 0) {
nbuf = bufpages;