Subject: Re: 4G memory
To: None <itojun@iijlab.net>
From: enami tsugutomo <enami@but-b.or.jp>
List: port-i386
Date: 08/21/2002 11:37:23
>Decrease BUFPAGES down to a sane number. I use
>options BUFPAGES=0x1000
could we somehow automate this? like below (not sure if it is
entirely correct, since i'm touching MI code):
How much the physmem (or bufpages) is? I guess integer overflows
while clamping nbuf.
enami.
Index: kern_allocsys.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/kern_allocsys.c,v
retrieving revision 1.18
diff -u -r1.18 kern_allocsys.c
--- kern_allocsys.c 2001/11/12 15:25:05 1.18
+++ kern_allocsys.c 2002/08/21 02:24:06
@@ -206,7 +206,7 @@
* XXX stopgap measure to prevent wasting too much KVM on
* the sparsely filled buffer cache.
*/
- if (nbuf * MAXBSIZE > VM_MAX_KERNEL_BUF)
+ if (nbuf > VM_MAX_KERNEL_BUF / MAXBSIZE)
nbuf = VM_MAX_KERNEL_BUF / MAXBSIZE;
#endif