Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 18 Sep 2002 13:19:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 18 Sep 2002 13:19:29 -0400 Received: from mx1.elte.hu ([157.181.1.137]:6042 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Wed, 18 Sep 2002 13:19:28 -0400 Date: Wed, 18 Sep 2002 19:31:53 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: Linus Torvalds Cc: Rik van Riel , Andries Brouwer , William Lee Irwin III , Subject: Re: [patch] lockless, scalable get_pid(), for_each_process() elimination, 2.5.35-BK In-Reply-To: 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 Content-Length: 1364 Lines: 29 This is not about 'PID space squeeze'. Every sane sysadmin sets pid_max to a high enough value - but sure i'm all for auto-sizing it - i proposed auto-sizing of the allocation bitmap so i have absolutely nothing against it. the fundamental problem is consecutive allocation of PIDs. It can and will happen, no matter what. In fact if it doesnt happen in every minute only every week or so it's even worse. The current get_pid() algorithm, if it sees 32K consequtively allocated PIDs [the next time the PID counter overflows and gets to the PID-range - with the new optimizations this can happen within 1 second even for a pid_max of 1 million], then the current algorithm goes into a 32K*32K loop, ie. a loop of 1 billion, which takes 32 seconds. only an infinite PID space [pratically infinite would be 64 bits or 128 bits] solves this problem in the current algorithm, or the patch we are proposing, which also solves some other pending problems so it's apparently a step in the right direction. (And it also enable us to compress the PID space to make it more readable for mere mortals - if that matters.) Ingo - 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/