Fetch an overide for NMBCLUSTERS from the kernel environment. Never allow

the value to be reduced below that defined when the kernel was built.
This commit is contained in:
Mike Smith 1999-01-15 17:24:05 +00:00
parent 419766671c
commit 8664a77199
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42705
2 changed files with 14 additions and 2 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.320 1999/01/06 23:05:36 julian Exp $
* $Id: machdep.c,v 1.321 1999/01/09 15:41:49 bde Exp $
*/
#include "apm.h"
@ -410,6 +410,12 @@ again:
*/
{
vm_offset_t mb_map_size;
int xclusters;
/* Allow override of NMBCLUSTERS from the kernel environment */
if (getenv_int("kern.ipc.nmbclusters", &xclusters) &&
xclusters > nmbclusters)
nmbclusters = xclusters;
mb_map_size = nmbufs * MSIZE + nmbclusters * MCLBYTES;
mb_map_size = roundup2(mb_map_size, max(MCLBYTES, PAGE_SIZE));

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.320 1999/01/06 23:05:36 julian Exp $
* $Id: machdep.c,v 1.321 1999/01/09 15:41:49 bde Exp $
*/
#include "apm.h"
@ -410,6 +410,12 @@ again:
*/
{
vm_offset_t mb_map_size;
int xclusters;
/* Allow override of NMBCLUSTERS from the kernel environment */
if (getenv_int("kern.ipc.nmbclusters", &xclusters) &&
xclusters > nmbclusters)
nmbclusters = xclusters;
mb_map_size = nmbufs * MSIZE + nmbclusters * MCLBYTES;
mb_map_size = roundup2(mb_map_size, max(MCLBYTES, PAGE_SIZE));