Date: Tue, 21 Aug 2001 00:13:09 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Bruce Evans <bde@zeta.org.au> Cc: Peter Wemm <peter@wemm.org>, <cvs-committers@FreeBSD.ORG>, <cvs-all@FreeBSD.ORG> Subject: Re: cvs commit: src/sys/boot/common loader.8 src/sys/conf options src/sys/i386/i386 machdep.c src/sys/i386/include param.h src/sys/kern subr_param.c src/sys/sys buf.h src/sys/vm swap_pager.c Message-ID: <200108210713.f7L7D9d60995@earth.backplane.com> References: <20010821141007.Y1177-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
:is in bytes, so `physmem_est / BKVASIZE' is normally 0 and nbuf is adjusted
:_up_ to maxbcache / BKVASIZE (default 12500) on almost all machines. On
:a machine with 32MB of RAM, this caused severe thrashing, and eventually
:hangs and a panic, after about 20MB of RAM was firmly allocated to buffers.
This is the pre-existing code. It looks severely broken in general:
/*
* Discount the physical memory larger than the size of kernel_map
* to avoid eating up all of KVA space.
*/
if (kernel_map->first_free == NULL) {
printf("Warning: no free entries in kernel_map.\n");
physmem_est = physmem;
} else
physmem_est = min(physmem, kernel_map->max_offset -
kernel_map->min_offset);
since kernel_map->max_offset - min_offset is in bytes, and physmem is
in pages.
I'll change everything to pages.
-Matt
:
:Index: machdep.c
:===================================================================
:RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
:retrieving revision 1.470
:diff -u -1 -r1.470 machdep.c
:--- machdep.c 20 Aug 2001 00:41:11 -0000 1.470
:+++ machdep.c 21 Aug 2001 00:57:50 -0000
:@@ -316,4 +314,3 @@
: nbuf += (physmem_est - 16384) * 2 / (factor * 5);
:-
:- if (maxbcache && nbuf > physmem_est / BKVASIZE)
:+ if (maxbcache != 0 && nbuf > maxbcache / BKVASIZE)
: nbuf = maxbcache / BKVASIZE;
:
:Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108210713.f7L7D9d60995>
