Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 26 Jul 2001 14:53:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 26 Jul 2001 14:52:59 -0400 Received: from perninha.conectiva.com.br ([200.250.58.156]:2571 "HELO perninha.conectiva.com.br") by vger.kernel.org with SMTP id ; Thu, 26 Jul 2001 14:52:44 -0400 Date: Thu, 26 Jul 2001 15:52:45 -0300 (BRST) From: Rik van Riel X-X-Sender: To: Paul Larson Cc: Subject: RE: Linux 2.4.7-ac1 In-Reply-To: <01072612421000.21482@plars.austin.ibm.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Original-Recipient: rfc822;linux-kernel-outgoing On Thu, 26 Jul 2001, Paul Larson wrote: > make it up to 980 threads on my machine. Saw this change in fork.c with > 2.4.7-ac1: > > - max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 2; > + max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 16; > > Any reason why this was done? The old default was to allow up to HALF of the system's memory to be allocated in task structs. Since each task will also want things like page tables, mm_struct, vma's, etc. it was pretty easy to just about KILL a system using nothing but a simple fork bomb, or some other thing running out of hand. The new default is to set the limit to something safe enough to not run the system completely out of swappable memory. This should protect the system in extreme situations. If the system administrator wants more tasks in the system, (s)he can always raise the limit in /proc/sys/kernel/threads-max regards, Rik -- Executive summary of a recent Microsoft press release: "we are concerned about the GNU General Public License (GPL)" http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com/ - 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/