summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_init.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2005-04-25 19:22:05 +0000
committerkris <kris@FreeBSD.org>2005-04-25 19:22:05 +0000
commit69fffa3c9388fd0037e762533fec59f5be6e92cf (patch)
tree75be0cffbbc58702fdcb22cdbf7b725d4f43d035 /sys/vm/vm_init.c
parent671e5d7cb6859c024a7667493f7510807ea0f607 (diff)
downloadFreeBSD-src-69fffa3c9388fd0037e762533fec59f5be6e92cf.zip
FreeBSD-src-69fffa3c9388fd0037e762533fec59f5be6e92cf.tar.gz
Add the vm.exec_map_entries tunable and read-only sysctl, which controls
the number of entries in exec_map (maximum number of simultaneous execs that can be handled by the kernel). The default value of 16 is insufficient on heavily loaded machines (particularly SMP machines), and if it is exceeded then executing further processes will generate a SIGABRT. This is a workaround until a better solution can be implemented. Reviewed by: alc MFC after: 3 days
Diffstat (limited to 'sys/vm/vm_init.c')
-rw-r--r--sys/vm/vm_init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c
index baa6678..9125366 100644
--- a/sys/vm/vm_init.c
+++ b/sys/vm/vm_init.c
@@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
+#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/selinfo.h>
#include <sys/pipe.h>
@@ -87,6 +88,11 @@ __FBSDID("$FreeBSD$");
long physmem;
+static int exec_map_entries = 16;
+TUNABLE_INT("vm.exec_map_entries", &exec_map_entries);
+SYSCTL_INT(_vm, OID_AUTO, exec_map_entries, CTLFLAG_RD, &exec_map_entries, 0,
+ "Maximum number of simultaneous execs");
+
/*
* System initialization
*/
@@ -188,7 +194,7 @@ again:
(nswbuf*MAXPHYS));
pager_map->system_map = 1;
exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr,
- (16*(ARG_MAX+(PAGE_SIZE*3))));
+ (exec_map_entries*(ARG_MAX+(PAGE_SIZE*3))));
pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva);
/*
OpenPOWER on IntegriCloud