svn commit: r288690 - stable/10/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Oct 5 05:33:31 UTC 2015
Author: kib
Date: Mon Oct 5 05:33:30 2015
New Revision: 288690
URL: https://svnweb.freebsd.org/changeset/base/288690
Log:
MFC r288068:
Ensure that maxproc does not exceed pid_max, at the time of boot.
Modified:
stable/10/sys/kern/subr_param.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/subr_param.c
==============================================================================
--- stable/10/sys/kern/subr_param.c Mon Oct 5 05:24:16 2015 (r288689)
+++ stable/10/sys/kern/subr_param.c Mon Oct 5 05:33:30 2015 (r288690)
@@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
#define NBUF 0
#endif
#ifndef MAXFILES
-#define MAXFILES (maxproc * 2)
+#define MAXFILES (40 + 32 * maxusers)
#endif
static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS);
@@ -261,6 +261,8 @@ init_param2(long physpages)
TUNABLE_INT_FETCH("kern.maxproc", &maxproc);
if (maxproc > (physpages / 12))
maxproc = physpages / 12;
+ if (maxproc > pid_max)
+ maxproc = pid_max;
maxprocperuid = (maxproc * 9) / 10;
/*
More information about the svn-src-stable-10
mailing list