diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-10-05 01:36:42 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-10-05 01:36:42 +0000 |
commit | 7f46dc2fbebee4c3600c1ecf0def96390b5a1197 (patch) | |
tree | 113d8d87daa226272b34557bf0ee718b5da9f387 /sys | |
parent | 0a02e410ceb9d0b58932f15b69cefa098049f342 (diff) |
only take in an account <4g memory for bufcache calculation as the upper part will not participate anyway; pedro@ ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 703ab4069bc..03494f86dbc 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.365 2006/09/19 11:06:33 jsg Exp $ */ +/* $OpenBSD: machdep.c,v 1.366 2006/10/05 01:36:41 mickey Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -559,12 +559,12 @@ allocsys(caddr_t v) /* * 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 - * buffers. We allocate 1/2 as many swap buffer headers as file - * i/o buffers. + * first 2MB of memory, and 5% of the rest of below 4G memory, + * with a minimum of 16 buffers. We allocate 1/2 as many swap + * buffer headers as file i/o buffers. */ if (bufpages == 0) { - bufpages = (btoc(2 * 1024 * 1024) + physmem) * + bufpages = (btoc(2 * 1024 * 1024 + avail_end)) * bufcachepercent / 100; } if (nbuf == 0) { |