summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-12 21:54:42 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-12 21:54:42 +0000
commitd29e0b384bed05aec8c3ae104d2cccf4e54b2702 (patch)
treef6f4e7de1bba5586c5eed48cd0b5832ea8a41754 /sys
parent17162fa2a590c4373f4b8f186334b73a7e181216 (diff)
BUFCACHEPERCENT for cranking % of mem used
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index e08454bff0a..5851531438a 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.22 1996/06/27 06:13:44 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.23 1996/09/12 21:54:41 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.202 1996/05/18 15:54:59 christos Exp $ */
/*-
@@ -345,6 +345,9 @@ allocsys(v)
valloc(msqids, struct msqid_ds, msginfo.msgmni);
#endif
+#ifndef BUFCACHEPERCENT
+#define BUFCACHEPERCENT 5
+#endif
/*
* Determine how many buffers to allocate. We use 10% of the
* first 2MB of memory, and 5% of the rest, with a minimum of 16
@@ -356,7 +359,7 @@ allocsys(v)
bufpages = physmem / (10 * CLSIZE);
else
bufpages = (btoc(2 * 1024 * 1024) + physmem) /
- (20 * CLSIZE);
+ ((100/BUFCACHEPERCENT) * CLSIZE);
if (nbuf == 0) {
nbuf = bufpages;
if (nbuf < 16)