diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2015-09-21 15:02:59 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2015-09-21 15:02:59 +0000 |
commit | 1f57d8c66b57361c613e9e5cc8adf7290c54af97 (patch) | |
tree | 498eeea83fc801aa214424bdb76dfcedb310e0d3 /sys/kern/subr_param.c | |
parent | 8153ec9ad5d16c3aeb6d830313c784395003ed23 (diff) |
Notes
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r-- | sys/kern/subr_param.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 52c6f167f753..65fb3e78d322 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -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); @@ -253,6 +253,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; /* |