Subject: Re: System crash with too much memory
To: Jason Thorpe <thorpej@wasabisystems.com>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
List: tech-kern
Date: 04/23/2003 13:33:10
On Tuesday 22 April 2003 11:52, Jason Thorpe wrote:
> It should be capping the amount of KVA used for buffers, but this is
> clearly not working.  I wonder if the problem is the amount of KVA
> being used for vm_page structures :-/

OK, more information.  As I said in an earlier message the value of nbuf is 
50810.  I modified sys/kern/kern_allocsys.c as follows:

    /*
     * Ensure a minimum of 16 buffers.
     */
    if (nbuf == 0) {
        nbuf = bufpages;
        if (nbuf < 16)
            nbuf = 16;
        if (nbuf > 8000) nbuf = 8000;            /* XXX Added */
    }

Now when I boot with 4GB it boots but when I check the number of buffers it is 
still 6144.  It seems that it is failing in some intermediate step but 
ultimately 6144 is still the largest size.  So does this seem like the right 
fix for this problem?  Should 8000 be replaced with a macro constant?

-- 
D'Arcy J.M. Cain <darcy@netbsd.org>
http://www.NetBSD.org/