Subject: Re: amd64 panics
To: Christopher A. Kantarjiev <cak@dimebank.com>
From: Frank van der Linden <fvdl@netbsd.org>
List: port-amd64
Date: 08/14/2005 18:56:58
Christopher A. Kantarjiev wrote:

> (this is a summary repost of several messages I sent to 
> comp.unix.bsd.netbsd.misc; someone finally sent me a clue-by-four that 
> the newsgroup isn't gated to people who know something.)
>
> 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.

Actually..

I am pretty sure that the kernel is much less hungry for kmap entries 
these days. Could you try building a -current or netbsd-3 branch kernel? 
I can build one for you if needed.

- Frank