Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 18 Sep 2002 12:27:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 18 Sep 2002 12:27:45 -0400 Received: from perninha.conectiva.com.br ([200.250.58.156]:7947 "HELO perninha.conectiva.com.br") by vger.kernel.org with SMTP id ; Wed, 18 Sep 2002 12:27:42 -0400 Date: Wed, 18 Sep 2002 13:32:29 -0300 (BRT) From: Rik van Riel X-X-Sender: riel@duckman.distro.conectiva To: Linus Torvalds Cc: Andries Brouwer , Ingo Molnar , William Lee Irwin III , Subject: Re: [patch] lockless, scalable get_pid(), for_each_process() elimination, 2.5.35-BK In-Reply-To: Message-ID: X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org 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 Content-Length: 833 Lines: 29 On Wed, 18 Sep 2002, Linus Torvalds wrote: > I would suggest something like this: > - make pid_max start out at 32k or whatever, to make "ps" look nice if > nothing else. > - every time we have _any_ trouble at all with looking up a new pid, we > double pid_max. > + if (nr_threads > pid_max >> 4) > + pid_max <<= 1; ... but watch out for over/underflow. ;) It would also be nice if we had some known limit on pid_max (say 8 million, fits in 7 digits). regards, Rik -- Spamtrap of the month: september@surriel.com http://www.surriel.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/