Subject: Re: panic: vm_fork: no more kernel virtual memory
To: Chris Jones <cjones@honors.montana.edu>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-pmax
Date: 03/09/1998 12:00:18
On Mon, 9 Mar 1998 12:32:58 -0700 (MST) 
 Chris Jones <cjones@honors.montana.edu> wrote:

 > I'm getting this panic on my 5000/260.  I've tried increasing
 > NKMEMCLUSTERS, because I was too lazy to dig into the guts of the kernel
 > to figure out where all the VM parameters were getting set, but I'm still
 > getting the panic.  This machine has lots of users, and consequently lots
 > of processes running at any given time.

NKMEMCLUSTERS doens't affect vm_fork().  vm_fork() allocates KVA space
for the user area from kernel_map.  What is probably happening is you're
using up all of the KVA space that the pmap's page tables can map, which
means that you need more of these kernel page tables.

Take a look in mips/mips/pmap.c, line 264 (inside pmap_bootstrap()).  This
is where the number of entries in the kernel's PTE table is computed.  This
computation probably needs to be adjusted to better consider the value of
maxproc.

Another alternative is to use UVM's pmap_growkernel() interface to
dynamically allocate more kernel PTE table pages.  This requires that
UVM work on the MIPS (and some other changes to the pmap interface, which
themselves also require UVM).  I have made the necessary modifications for
the pmax port, but it seems to lose when I attempt to run the 3rd or 4th
user process.  If someone wants to help debug that, please get in touch
with me.

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 415 428 6939