From owner-freebsd-current@FreeBSD.ORG Tue Feb 3 01:55:20 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13F3616A4CE; Tue, 3 Feb 2004 01:55:20 -0800 (PST) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 431F343D1F; Tue, 3 Feb 2004 01:55:18 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfmse.dialup.mindspring.com ([165.247.219.142] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1AnxGk-0000A5-00; Tue, 03 Feb 2004 01:54:59 -0800 Message-ID: <401F701D.14537DBE@mindspring.com> Date: Tue, 03 Feb 2004 01:55:41 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Peter Jeremy References: <20040129134121.GB53644@frontfree.net> <20040129200442.GA52780@VARK.homeunix.com> <20040131215006.GP908@cirb503493.alcatel.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4655f107646ba2551e448c12a974a99a3350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: David Schultz cc: Olivier Houchard cc: current@freebsd.org cc: Jun Su Subject: Re: Call for testers: New PID allocator patch for -CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 09:55:20 -0000 [ ... dropping -hackers and leaving -current in ... ] Peter Jeremy wrote: > Note that many system utilities "know" that pids can be represented > in 5 digits and having max_pid exceed 99999 will disrupt output from > top, ps, lsof, pstat etc. This places an upper limit on how high > max_pid can be realistically tuned. Personally, I don't think this really matters; probably the correct thing to do if this was an issue would be to cut down the column with the command name in it. The thing that really matters is the delimiter character for "cut -d" for scripts, which should be using that method, rather than specific column data. Alternately, for ps, you could set the "COLUMNS" environment variable to a large number and/or use the "-www" argument. FWIW: The hard and fast limit is actually 0x000fffff, from event.h, because of the way kevents are handled for EVFILT_PROC to stuff the PID into the hints fiels. Practically, this works out to 1048575, before you run out of bits to represent the PID. Jeffrey Hsu submitted a patch for this once, and I submitted a patch for this once, which added a separate hint field internally (and added support for System V IPC kevents). A side effect of this patch is to permit contracts betwen user space and the kernel event filters, which can't be done without the address of a structure, which is one of the things I was passing around as the (now larger) hint. In other words, it fixes the Linux complaint about "edge vs. level" that has kept them from adopting the kqueue/kevent interfaces, by letting you have a choice in the events, and/or pass around a larger event buffer for multiple events to be copied out, etc.. -- Terry