From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753034AbbCOQbH (ORCPT ); Sun, 15 Mar 2015 12:31:07 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:33224 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752816AbbCOQbD (ORCPT ); Sun, 15 Mar 2015 12:31:03 -0400 Message-ID: <5505B3BE.1020800@roeck-us.net> Date: Sun, 15 Mar 2015 09:30:54 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Heinrich Schuchardt , Andrew Morton CC: Aaron Tomlin , Andy Lutomirski , Davidlohr Bueso , David Rientjes , "David S. Miller" , Fabian Frederick , "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 Subject: Re: [PATCH 4/4 v6] Doc/sysctl/kernel.txt: document threads-max References: <1426436018-5159-1-git-send-email-xypron.glpk@gmx.de> <1426436018-5159-5-git-send-email-xypron.glpk@gmx.de> In-Reply-To: <1426436018-5159-5-git-send-email-xypron.glpk@gmx.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=0.0 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020206.5505B3C7.0219,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.001 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: C_4847, X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 2 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/15/2015 09:13 AM, Heinrich Schuchardt wrote: > 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 value > +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 >