Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 9 Aug 2002 17:59:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 9 Aug 2002 17:59:39 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:47888 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Fri, 9 Aug 2002 17:59:38 -0400 Date: Fri, 9 Aug 2002 15:04:09 -0700 (PDT) From: Linus Torvalds To: Paul Larson cc: Hubertus Franke , Rik van Riel , Andries Brouwer , Andrew Morton , , Dave Jones , lkml Subject: Re: [PATCH] Linux-2.5 fix/improve get_pid() In-Reply-To: <1028929600.19435.373.camel@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 Content-Length: 1949 Lines: 42 On 9 Aug 2002, Paul Larson wrote: > On Fri, 2002-08-09 at 16:42, Linus Torvalds wrote: > > Hmm.. Giving them a quick glance-over, the /proc issues look like they > > shouldn't be there in 2.5.x anyway, since the inode number really is > > largely just a random number in 2.5 and all the real information is > > squirelled away at path open time. It looks like the biggest impact on /proc would be that the /proc/ inodes wouldn't be 10%% unique any more, which in turn means that an old-style /bin/pwd that actually walks the tree backwards and checks the inode number would occasionally fail. That in turn makes me suspect that we'd better off just biting the bullet and makign the inode numbers almost completely static, and forcing that particular failure mode early rather than hit it randomly due to unlucky timing. Doing a simple strace shows that all the systems I have regular access to use the "getcwd()" system call anyway, which gets this right on /proc (and other filesystems that do not guarantee unique inode numbers) > So for now then, should I dig out my original (minimal) patch that > *just* fixed the "loop forever even if we're out of pids" problem? Even > if we increase PID_MAX to something obscenely high, I think we should > still be checking for this. Ehh, considering that especially with a 30-bit pid, there's _no_ way we'd run out without some other serious problems hitting us long before (out of memory being the obvious one), I don't think even that is an issue. With a minimum of 8kB / pid for process overhead, you need to have at least 43 bits of physical address space completely populated just to cover the memory uses of that many pid's. Linus - 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/