Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753099AbbBXWUJ (ORCPT ); Tue, 24 Feb 2015 17:20:09 -0500 Received: from mail-ie0-f169.google.com ([209.85.223.169]:36613 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750788AbbBXWUH (ORCPT ); Tue, 24 Feb 2015 17:20:07 -0500 Date: Tue, 24 Feb 2015 14:20:04 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Heinrich Schuchardt cc: Andrew Morton , Aaron Tomlin , Andy Lutomirski , Davidlohr Bueso , "David S. Miller" , Fabian Frederick , Guenter Roeck , "H. Peter Anvin" , Ingo Molnar , Jens Axboe , Joe Perches , Johannes Weiner , 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 Subject: Re: [PATCH 3/3] kernel/sysctl.c: threads-max observe limits In-Reply-To: <54ECED97.5070500@gmx.de> Message-ID: References: <1424722477-23758-1-git-send-email-xypron.glpk@gmx.de> <1424806701-30099-1-git-send-email-xypron.glpk@gmx.de> <1424806701-30099-4-git-send-email-xypron.glpk@gmx.de> <54ECED97.5070500@gmx.de> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1269 Lines: 30 On Tue, 24 Feb 2015, Heinrich Schuchardt wrote: > >> Users can change the maximum number of threads by writing to > >> /proc/sys/kernel/threads-max. > >> > >> With the patch the value entered is checked against the same > >> limits that apply when fork_init is called. > >> > > > > Correct me if I'm wrong, but this is a change in functionality (without > > update to Documentation/sysctl/kernel.txt which describes threads-max) > > since it does not allow the value to be lowered as before from the > > calculation involving totalram_pages. The value passed to > > set_max_threads() only caps the value. > > threads_max is set to the value the user inputs if it is inside the > interval [20, FUTEX_TID_MASK] and it is capped by the value calculated > from totalram_pages. > > So lowering and raising is still possible (inside the limits). > I believe this information should be added to the documentation cited above which mentions threads-max since users will otherwise be unfamiliar with the limits imposed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/