Best way to get max KVA setting?

Paul Saab ps at
Tue Jul 1 06:42:42 PDT 2003

Terry Lambert (tlambert2 at wrote:
> It was for a guy who was was running with PAE enabled on an
> 8G machine, and the autotuning was shooting him in the foot
> when it tried to grab enough memory to create kmem_map entries
> for the 8G of RAM in his 2G KVA space, and its head exploded.

Wrong, the big problem he had with the auto tuning code was that
vm_kmem_size was overflowing and he was left with a 20MB kmem_map size
instead of 200.  Once alc fixed the the scaling for # of vnodes, or if
we set maxvnodes to a sane value, we no longer saw panics due to kmem_map
being too small.

revision 1.126
date: 2003/06/11 05:18:59;  author: ps;  state: Exp;  lines: +4 -4
Don't overflow when calculating vm_kmem_size.  This fixes kmem_map
too small panics on PAE machines which have odd > 4GB sizes (4.5 gig
would render a 20MB of KVA for kmem_map instead of 200MB).

Submitted by:   John Cagle <john.cagle at>, jeff
Reviewed by:    jeff, peter, scottl, lots of USENIX folks

More information about the freebsd-current mailing list