Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Doc/sysctl/kernel.txt: document threads-max

File /proc/sys/kernel/threads-max controls the maximum number of threads
that can be created using fork().

[akpm@linux-foundation.org: fix typo, per Guenter]
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Heinrich Schuchardt and committed by
Linus Torvalds
0ec62afe 16db3d3f

+21
+21
Documentation/sysctl/kernel.txt
··· 872 872 873 873 ============================================================== 874 874 875 + threads-max 876 + 877 + This value controls the maximum number of threads that can be created 878 + using fork(). 879 + 880 + During initialization the kernel sets this value such that even if the 881 + maximum number of threads is created, the thread structures occupy only 882 + a part (1/8th) of the available RAM pages. 883 + 884 + The minimum value that can be written to threads-max is 20. 885 + The maximum value that can be written to threads-max is given by the 886 + constant FUTEX_TID_MASK (0x3fffffff). 887 + If a value outside of this range is written to threads-max an error 888 + EINVAL occurs. 889 + 890 + The value written is checked against the available RAM pages. If the 891 + thread structures would occupy too much (more than 1/8th) of the 892 + available RAM pages threads-max is reduced accordingly. 893 + 894 + ============================================================== 895 + 875 896 unknown_nmi_panic: 876 897 877 898 The value in this file affects behavior of handling NMI. When the