Re: Best way to get max KVA setting?

From: Terry Lambert <tlambert2_at_mindspring.com>
Date: Wed, 25 Jun 2003 22:48:00 -0700
Mike Silbersack wrote:
> I found the thread in question, but I didn't see a patch.

ARGH.  There was a simultaneous off-list discussion; here is
the scrubbed part of what I sent; it's a patch, but it's not a
diff; sorry for the confusion.

-- Terry
-----------------------------------------------------------------
The correct place to hack the is /usr/src/sys/kern/subr_param.c.

Specifically, every place it references "physpages", the number
is way, way too big.

At the very top of the routine init_param2(), put something like:


        long ephyspages;                /* effective physical pages */
        long clamp = 3 * 1024 * 256;    /* 3G, in pages */

        ephyspages = physpages;

        /* clamp effective memory to real KVA limits */
        if (ephyspages > clamp)
                ephyspages = clamp;


And then everywhere it references "physpages" below that, change
it to "ephyspages" instead.

In the version of the file I have, it looks like you could
override everything at boot time; I didn't check to see how
much (or if) this had changed in -current, so it may be that
you could tweak everything you needed to then, instead.
-----------------------------------------------------------------
Received on Wed Jun 25 2003 - 20:49:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:13 UTC