Subject: 1.4 lossage on 1G RAM machines
To: None <port-i386@netbsd.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-i386
Date: 05/20/1999 12:20:35
Hi folks...

So, I think I tracked this down (with some help from Havard -- thanks!).

The bug is more or less specific to anything which implements the new
pmap_growkernel() interface.

Basically, what's happening is that uvm_pageboot_alloc() is running
out of virtual space.  This is happening because with a REALLY LARGE
number of managed pages, it has to allocate more data structures, etc.

Anyhow, the problem here is that in pmap_boostrap(), the i386 pmap
initialized virtual_end to VM_MAX_KERNEL_ADDRESS, but PT pages to
map that much are not yet allocated.

There are four things that need to happen...

	(1) pmap_bootstrap() need to initialize virtual_end to the
	    correct value.

	(2) uvm_pageboot_alloc() needs to grow the kernel address space
	    when there isn't enough to map what it needs.

	(3) pmap_growkernel() needs to be able to deal with early
	    growing of the kernel address space.

	(4) If growing the address space fails, uvm_pageboot_alloc() needs
	    to fail gracefully, rather than unpredictably.

"I'm on it."  I'll send out an update shortly, and probably ask for
people to test things (unless I can get my hands on a 1G RAM machine
here at work).

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>