diff options
Diffstat (limited to 'sys/arch/i386/i386/machdep.c')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index ad3a266aa0f..2969cc3413c 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.452 2009/06/03 21:30:19 beck Exp $ */ +/* $OpenBSD: machdep.c,v 1.453 2009/06/15 17:01:26 beck Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -547,6 +547,11 @@ setup_buffers() if (bufpages == 0) bufpages = atop(avail_end) * 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; } /* |