Subject: Re: NetBSD1.6 UVM problem?
To: Sylvain Fontaine <sfontaine@hyperchip.com>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 12/09/2002 18:27:24
hi,

the idea with the 15/16 is that some amount of RAM is going to be
consumed by kernel overhead, such as the buffer cache and all the
kernel datastructures that describe files, processes, etc.
it doesn't make much sense to allocate anons to describe the memory
that won't be able to be used for anons anyway.  the 15/16 is
just a rough guess and there shouldn't be problem with just using
"nanon = uvmexp.free", it will just waste a little memory.

the real solution is to allocate anon structures in chunks as we need them
instead of all at once early on.

-Chuck


On Mon, Dec 09, 2002 at 03:41:08PM -0500, Sylvain Fontaine wrote:
> Thanks Chuq,
> This fix does solve part of the problem, but now 
> I run out of anon memory...
> 
> void
> uvm_anon_init()
> {
> 	int nanon = uvmexp.free - (uvmexp.free / 16); /* XXXCDC ??? */
> ...
> }
> 
> Is this 1/16 necessary... ????  If I anon_init all uvmesp.free,
> will I encounter some problems?  What's the drawback ??
> 
> Sylvain