Subject: machdep.c problem?
To: Mac-Port NetBSD Mailing List <port-mac68K@NetBSD.ORG>
From: Sean Sweda <sweda@netcommandos.com>
List: port-mac68k
Date: 02/17/1998 22:20:56
I tried to increase the size of the buffer cache, using the following
kernel config options:
options NBUF=512
options BUFPAGES=512
So instead of getting 204 pages using 835584 bytes, I should get
512 pages using 2097152 bytes. However, from what I can tell, this
does not work properly. I've traced the "problem" to this line of
code in machdep.c:
if (bufpages == 0)
if (physmem < btoc(2 * 1024 * 1024))
bufpages = physmem / 10 / CLSIZE;
else
bufpages = (btoc(2 * 1024 * 1024) + physmem) / 20 / CLS>
bufpages = min(NKMEMCLUSTERS * 2 / 5, bufpages);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What is this NKMEMCLUSTERS constant? Where does it get set? Why does
it override the BUFPAGES option?
here is the brief description in the options man page:
options NKMEMCLUSTERS=value
number of slots in the kernel submap "kmem_map". [Better description,
please? Chris CGD had some comments that I didn't understand.] Default is
<look this up>. Increase this value if you get "out of space in
kmem_map" panics.
So, what's going on here?
Sean
---
Sean Sweda
sweda@ibl.org http://www.ibl.org/~sweda
sweda@netcommandos.com http://advantage.netcommandos.com