summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2009-06-15 17:01:27 +0000
committerBob Beck <beck@cvs.openbsd.org>2009-06-15 17:01:27 +0000
commit2ad23154352bb286faa9d4e90c688c5bea78c525 (patch)
tree74d852efc8530c595f03e7c280d4b345659b6e3e /sys/arch/sgi
parent53a176b4ab49f0631c3e478055286d9e4e625d32 (diff)
Back out all the buffer cache changes I committed during c2k9. This reverts three
commits: 1) The sysctl allowing bufcachepercent to be changed at boot time. 2) The change moving the buffer cache hash chains to a red-black tree 3) The dynamic buffer cache (Which depended on the earlier too). ok on the backout from marco and todd
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/sgi/machdep.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index c44bd038eec..f296ef4b2b8 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.73 2009/06/13 21:48:03 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.74 2009/06/15 17:01:26 beck Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -768,6 +768,12 @@ cpu_startup()
if (bufpages == 0)
bufpages = physmem * bufcachepercent / 100;
+ /* Restrict to at most 25% filled kvm. */
+ if (bufpages >
+ (VM_MAX_KERNEL_ADDRESS-VM_MIN_KERNEL_ADDRESS) / PAGE_SIZE / 4)
+ bufpages = (VM_MAX_KERNEL_ADDRESS-VM_MIN_KERNEL_ADDRESS) /
+ PAGE_SIZE / 4;
+
/*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.