Subject: Re: NMBCLUSTERS setting issues
To: Andy Ruhl <acruhl@gmail.com>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: netbsd-help
Date: 07/05/2005 10:43:20
overflowtext="",overflowoffset=0
date:component="Your message dated",formatfield=""
body:component=">",overflowtext=">",overflowoffset=0
In message <78a2305a050705095838348403@mail.gmail.com>Andy Ruhl writes
>I ran into the problem described here:
>
>http://www.netbsd.org/Documentation/kernel/#mclpool-limit
>
>There are 3 possible ways to get around this that I know of:
>
>1. Set the sysctl for kern.mbuf.nmbclusters higher

Increasing mbuf-cluster space works only on some platforms
(MACHINE_ARCHes).  The sysctl kern.mbuf.nmbclustres is present on all
platforms, but is writable only where dynamically changing
mbuf-cluster size is supported.

On other platforms, either the CPU memory-mapping for kernel space, or
NetBSD's use of the memory-mapping hardware for the kernel virtual
address (KVA) space, does not allow dynamic resizing of various KVA
areas like mbuf clusters. On those platforms, kern.mbuf.nmbclusters is
readonly.

(I could well be wrong though; if so Jason will race to correct me).

>2. Use gdb to edit the kernel
>3. Recompile the kernel
>
>It might be possible to use userconf, I don't know, this page doesn't
>describe it though.
>
>On my standard 2.0.2 i386 machine (GENERIC kernel), option #1 fails
>with "operation not permitted" when I try to set it to 2048. #2 causes
>gdb to core dump. So my only option left is #3, which I really didn't
>want to do on this particular machine.
>
>Am I missing something? Do I just have to recompile?


On i386, I beleive you have to recompile (but see caveat above).