Subject: Re: 7GB memtest causes hard system hang.
To: Frank van der Linden <fvdl@netbsd.org>
From: Chuck Silvers <chuq@chuq.com>
List: port-amd64
Date: 01/30/2006 09:16:17
On Sun, Jan 22, 2006 at 12:45:27PM +0100, Frank van der Linden wrote:
> On Wed, Jan 18, 2006 at 09:07:30AM -0800, Chuck Silvers wrote:
> > On Mon, Jan 16, 2006 at 10:22:24PM +0100, Frank van der Linden wrote:
> > this is also the cause of PR 32157, kmem_map fills up and then we go into
> > an infinite loop trying to allocate more memory.
> > 
> > is there any reason we shouldn't increase NKMEMPAGES_MAX_DEFAULT to 1 GB
> > at this point?
> 
> It should probably be done, but I have seen one report of it causing
> a problem early during boot. THis is from an older message (august
> last year) about NetBSD 2.0.2:

the problem he had with increasing NKMEMPAGES too high was most likely
due to running of the initial pv entries like wolfgang solfrank pointed
out about a year ago.  that problem is gone in -current, but we'd need
to apply that part of his patch for 3.0 and earlier.

I'll go ahead and apply these changes for both -current and 3.x
if there is no objection.

-Chuck


> Christopher A. Kantarjiev wrote:
> 
> > I've built up a dual dual-core Opteron machine with a lot of memory
> > and have run into various panics. I'm running 2.0.2, and I have pretty
> > much filled RAM with data that is mmap'd from disk files, accessed
> > read-only by four processes.
> >
> > At first, the machine had 8GB and I didn't have much difficulty, but I
> > would occasionally get
> >
> > panic: uvm_mapent_alloc: out of static map entries
> >
> > I bumped the static number to 2000 and the issue 'went away'.
> >
> > Then I added 8GB, total of 16GB, and had more fun:
> >
> > panic: pmap_enter: no pv entries available
> >
> > It was suggested that I bump NKMEMPAGES=100000, which I did, and got a
> > quick 'trap 6' on boot! But I have NKMEMPAGES=60000 now, and I'm not
> > getting that panic any more.
> >
> > But I continue to get
> >
> > panic: uvm_mapent_alloc: out of static map entries
> >
> > I have increased the static number to 8000, and pulled out 4GB (total
> > 12GB at the moment), and the problem still exists; more annoyingly,
> > the system doesn't crash cleanly (hangs while syncing disks). So we
> > are rebooting every two days
> > to avoid the hangs.
> >
> > I'd love to find a real fix for this. Is there a way to track the
> > number of KMAPENT entries that are in use? vmstat doesn't seem to have
> > an appropriate option.
> 
> - Frank