From 17ebe960a678e143b101ea90f99c1a1ae9335f70 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Tue, 15 Jan 2013 19:26:17 +0000 Subject: Do not autotune ncallout to be greater than 18508. When maxusers was unrestricted and maxfiles was allowed to autotune much higher the result was that ncallout which was based on maxfiles and maxproc grew much higher than was needed. To fix this clip autotuning to the same number we would get with the old maxusers algorithm which would stop scaling at 384 maxusers. Growing ncalout higher is not likely to be needed since most consumers of timeout(9) are gone and any higher value for ncallout causes the callwheel hashes to be much larger than will even be needed for most applications. MFC after: 1 month Reviewed by: mav --- sys/kern/subr_param.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern/subr_param.c') diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index fcb41e717d4a..76716150a216 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -326,8 +326,11 @@ init_param2(long physpages) /* * XXX: Does the callout wheel have to be so big? + * + * Clip callout to result of previous function of maxusers maximum + * 384. This is still huge, but acceptable. */ - ncallout = 16 + maxproc + maxfiles; + ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); /* -- cgit v1.2.3