From owner-svn-src-all@FreeBSD.ORG Sat Dec 15 01:13:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54DA4BDE; Sat, 15 Dec 2012 01:13:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id C33608FC12; Sat, 15 Dec 2012 01:13:04 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qBF1D04C074042; Sat, 15 Dec 2012 03:13:00 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua qBF1D04C074042 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qBF1D0pJ074041; Sat, 15 Dec 2012 03:13:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 15 Dec 2012 03:13:00 +0200 From: Konstantin Belousov To: Pawel Jakub Dawidek Subject: Re: svn commit: r244154 - head/bin/ps Message-ID: <20121215011300.GN71906@kib.kiev.ua> References: <201212121545.qBCFj4Hl086444@svn.freebsd.org> <20121212210652.GO3013@kib.kiev.ua> <20121213111240.GB1381@garage.freebsd.pl> <201212141152.15567.jhb@freebsd.org> <20121214214246.GB1411@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gWRamliw218YCZO9" Content-Disposition: inline In-Reply-To: <20121214214246.GB1411@garage.freebsd.pl> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 01:13:05 -0000 --gWRamliw218YCZO9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 14, 2012 at 10:42:47PM +0100, Pawel Jakub Dawidek wrote: > On Fri, Dec 14, 2012 at 11:52:15AM -0500, John Baldwin wrote: > > On Thursday, December 13, 2012 6:12:44 am Pawel Jakub Dawidek wrote: > > > On Wed, Dec 12, 2012 at 11:06:52PM +0200, Konstantin Belousov wrote: > > > > On Wed, Dec 12, 2012 at 03:45:04PM +0000, Pawel Jakub Dawidek wrote: > > > > > Author: pjd > > > > > Date: Wed Dec 12 15:45:03 2012 > > > > > New Revision: 244154 > > > > > URL: http://svnweb.freebsd.org/changeset/base/244154 > > > > >=20 > > > > > Log: > > > > > Use kern.max_pid sysctl to obtain maximum PID number instead of= using local > > > > > define. > > > > It is pid_max, not max_pid. > > > >=20 > > > > But the change is wrong. The kern.pid_max only limits newly allocat= ed pids, > > > > it does not magically moves existing pids, which are out of range, = to the > > > > limited region. See the corresponding commit log for the descriptio= n. > > > > It was added to make it easier to run FreeBSD 1.x binaries on the m= odern > > > > kernels. > > >=20 > > > I saw CTLFLAG_TUN on the sysctl and assumed it is read-only... > > > How about defining BSD_PID_MAX in sys/proc.h, which would be visible = by > > > userland as well and setting PID_MAX to BSD_PID_MAX? > > >=20 > > > This would also help bsnmpd. > > >=20 > > > http://people.freebsd.org/~pjd/patches/PID_MAX.patch > >=20 > > This doesn't help your actual use case though where you want to boot a = kernel > > with a different PID_MAX. I would much rather our tools learn such con= stants > > from the kernel via sysctl than have them compiled in. So, I would add= a new > > sysctl which exports the true PID_MAX constant (and is read-only and ne= ver > > changes) and use that in ps, etc. >=20 > In that case I'd prefer to make existing kern.pid_max sysctl read-only > and make it loader tunable. I don't expect there are many users of this > sysctl... >=20 No, I described you the purpose of the sysctl. Requiring reboot just for running the old binaries is not useful. Please do not break it. --gWRamliw218YCZO9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQy86bAAoJEJDCuSvBvK1B1UYQAJGxn1OlblMAxtkeUdIBTPNi WHqYuZpFYF/niLn0JJb1Xxw6CGb6mO+ECsI32QT7fZ7vzL9jMIlZk4n+cbnJLvLY +EeTThtHwRWAKIZodRV31GmDS0j8+HNqHhKrsVmskr+MRyOSu1zWSsim++gRjx3c ZlYc85D1yyfjQKTxDM/TepEBUUDPkTxZZTs75vsA6lWQnL572uTg5nIHJeyVekpj hkzZSGYa2fYmk7V+XYyRVxWGdDu9mkpJk77I07GScL0G4caSI5DsobB6i4VaWq3o 6LWMf+JzpUpqHVhz+63K5P19Fj9sqOHVVwr5Px8jPge7L8XE7oG6U6QXNr+W4Aip zOB5CaAMfTgL9LByeXuQJ3Is0GAJaiXH8PukGMrMvi9pP/EwZTPkM8ItlBunvOvH u9d7xclHuYTqtT1MJ16AJporwy9QbwCKiszHU1aOTAIJH7Yaou9GzRLLz8Q6aET/ vdytZ4IE7JuMOTKUVZnQIAgnwQglL0pOEl9IB2ATpp2knQVxeuyzd8uBPAD5pW6h pZ5UGtcJpGM809aFrpe54LWb36O+injXtk14n5GzZUiQeVT7miL4fdy1bWmfhXNA XiZ7YgGJ9X0aTZcfidupgJLH1WiOvsJT9QrJzHJMAANKBEwpNngxqg7N9o5O5QXh uAMHUBrk43hNH3Y0CUM/ =8Y1r -----END PGP SIGNATURE----- --gWRamliw218YCZO9--