Subject: Re: malloc failures in kernel
To: Charles Shannon Hendrix <shannon@widomaker.com>
From: David Brownlee <abs@netbsd.org>
List: port-sparc
Date: 01/23/2004 14:06:49
On Thu, 22 Jan 2004, Charles Shannon Hendrix wrote:

> I continue to have the following crashes in NetBSD 1.6:
>
> malloc: out of space in kmem_map
>
> In the past, I was told this was some kind of untested code path in the
> kernel.
>
> Is this fixed in 1.6?
>
> Is there any way to prevent it if it cannot be fixed?
>
> It happens most often during big NFS loads, or heavy disk->disk I/O.
>
> The hardware is a Sun SS5.

	I run a sparc5 NFS server under 1.6.x with NKMEMPAGES_MAX=5120 in
	the kernel config. Before I added that I was getting same panics.
	Its running 1.6.1_STABLE. I might switch it to 1.6.2 when its
	released or just make the move to -current (I have a sparc20 and
	two ultra1s running current and they all pretty happy campers)

	From options(4)

     options NKMEMPAGES_MAX=value
     Size of kernel VM map kmem_map, in PAGE_SIZE-sized chunks (the VM page
     size; this value may be read from the sysctl(8) variable hw.pagesize ).
     This VM map is used to map the kernel malloc arena.  The kernel attempts
     to auto-size this map based on the amount of physical memory in the sys-
     tem.  Platform-specific code may place bounds on this computed size,
     which may be viewed with the sysctl(8) variable vm.nkmempages.  See
     /usr/include/machine/param.h for the default upper and lower bounds.  The
     related options `NKMEMPAGES_MIN' and `NKMEMPAGES_MAX' allow the bounds to
     be overridden in the kernel configuration file.  These options are pro-
     vided in the event the computed value is insufficient resulting in an
     ``out of space in kmem_map'' panic.

-- 
		David/absolute          -- www.netbsd.org: No hype required --