summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2002-02-06 01:19:19 +0000
committerdillon <dillon@FreeBSD.org>2002-02-06 01:19:19 +0000
commit9371a9a23b6795e0a824d3f629c1e32aaa07513d (patch)
treeb41db42545125e823b518a0af193188d5118bbe0 /sys
parent0e8becc5468e6af73f6be77f7809fe144aa688b6 (diff)
downloadFreeBSD-src-9371a9a23b6795e0a824d3f629c1e32aaa07513d.zip
FreeBSD-src-9371a9a23b6795e0a824d3f629c1e32aaa07513d.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_param.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 2dc6f5b..d9eb2c7 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -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:
OpenPOWER on IntegriCloud