From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752891AbbCOQPE (ORCPT ); Sun, 15 Mar 2015 12:15:04 -0400 Received: from mout.gmx.net ([212.227.17.21]:62949 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752677AbbCOQOs (ORCPT ); Sun, 15 Mar 2015 12:14:48 -0400 From: Heinrich Schuchardt To: Andrew Morton Cc: Aaron Tomlin , Andy Lutomirski , Davidlohr Bueso , David Rientjes , "David S. Miller" , Fabian Frederick , Guenter Roeck , "H. Peter Anvin" , Ingo Molnar , Jens Axboe , Joe Perches , Johannes Weiner , Jonathan Corbet , Kees Cook , Michael Marineau , Oleg Nesterov , "Paul E. McKenney" , Peter Zijlstra , Prarit Bhargava , Rik van Riel , Rusty Russell , Steven Rostedt , Thomas Gleixner , Vladimir Davydov , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Heinrich Schuchardt Subject: [PATCH 4/4 v6] Doc/sysctl/kernel.txt: document threads-max Date: Sun, 15 Mar 2015 17:13:38 +0100 Message-Id: <1426436018-5159-5-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426436018-5159-1-git-send-email-xypron.glpk@gmx.de> References: <1426436018-5159-1-git-send-email-xypron.glpk@gmx.de> X-Provags-ID: V03:K0:Mc6t478RdhxwofpwX3hQQcyQQGaeWIX6ioaY/3RfqhuFc5/sa2K UJQEB4ZN0e5UYRMCBr4HMKH7rQImDQpqg+2Pu2KJxnOG5ZLXQsOI8nqhCGiMFRFKp7cLKX3 VJ38ZoHFYZAK22LZbTe4vyNvyBdWQekz6UTRCWQLYuhZLxxgaAtMLIETC+SYDCdc+09KQfn ldKdw1fZ5FhqdY+HcrPog== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org File /proc/sys/kernel/threads-max controls the maximum number of threads that can be created using fork(). Signed-off-by: Heinrich Schuchardt --- Documentation/sysctl/kernel.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 75511ef..40f9c90 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -846,6 +846,27 @@ can be ORed together: ============================================================== +threads-max + +This value controls the maximum number of threads that can be created +using fork(). + +During initialization the kernel sets this value such that even if the +maximum number of threads is created, the thread structures occupy only +a part (1/8th) of the available RAM pages. + +The minimum value that can be written to threads-max is 20. +The maximum vlaue that can be written to threads-max is given by the +constant FUTEX_TID_MASK (0x3fffffff). +If a value outside of this range is written to threads-max an error +EINVAL occurs. + +The value written is checked against the available RAM pages. If the +thread structures would occupy too much (more than 1/8th) of the +available RAM pages threads-max is reduced accordingly. + +============================================================== + unknown_nmi_panic: The value in this file affects behavior of handling NMI. When the -- 2.1.4