Subject: Re: Ungraceful low memory issue
To: None <port-macppc@netbsd.org, port-sparc@netbsd.org,>
From: Juergen Hannken-Illjes <hannken@netbsd.org>
List: current-users
Date: 08/14/2004 12:33:16
On Sat, Aug 14, 2004 at 08:19:46AM +0200, Havard Eidnes wrote:
> > If this guesswork is right, I don't really have any idea how to go about
> > fixing it, though -- that would be something for the VM experts among us.
> 
> Intuitively it would seem that some memory should be reserved for
> e.g. the pool allocator and that backpressure on the other users of
> physical memory needs to imposed a bit earler than before we run
> completely out.

Would it help to remove these lines from uvm_pdaemon.c::uvmpd_tune() ?

	uvmexp.freemin = uvmexp.npages / 20;

->	/* between 16k and 256k */
->	/* XXX:  what are these values good for? */
->	uvmexp.freemin = MAX(uvmexp.freemin, (16*1024) >> PAGE_SHIFT);
->	uvmexp.freemin = MIN(uvmexp.freemin, (256*1024) >> PAGE_SHIFT);

The min threshhold (16*1024) will almost never be used as it means a
memory size of 20*2*8k == 320k for a pagesize of 8k. So it will always
clamp uvmexp.freemin to 256k which is very low for modern memory sizes.

-- 
Jürgen Hannken-Illjes - hannken@netbsd.org