Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2003 22:48:00 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Mike Silbersack <silby@silby.com>
Cc:        current@freebsd.org
Subject:   Re: Best way to get max KVA setting?
Message-ID:  <3EFA8910.6E271781@mindspring.com>
References:  <20030625002841.X7607@odysseus.silby.com> <3EF95C9D.2CE63283@mindspring.com> <20030625123457.J7607@odysseus.silby.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
-----------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EFA8910.6E271781>