Allow the kern.maxusers boot tuneable to be set to 0 (previously only
the kernel config's maxusers could be set to 0 for autosizing to work). Reviewed by: rwatson, imp MFC after: 3 days
This commit is contained in:
parent
1c71deff79
commit
0b94a0e9f9
@ -133,14 +133,15 @@ init_param2(int physpages)
|
||||
{
|
||||
|
||||
/* Base parameters */
|
||||
if ((maxusers = MAXUSERS) == 0) {
|
||||
maxusers = MAXUSERS;
|
||||
TUNABLE_INT_FETCH("kern.maxusers", &maxusers);
|
||||
if (maxusers == 0) {
|
||||
maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE);
|
||||
if (maxusers < 32)
|
||||
maxusers = 32;
|
||||
if (maxusers > 384)
|
||||
maxusers = 384;
|
||||
}
|
||||
TUNABLE_INT_FETCH("kern.maxusers", &maxusers);
|
||||
|
||||
/*
|
||||
* The following can be overridden after boot via sysctl. Note:
|
||||
|
Loading…
x
Reference in New Issue
Block a user