From owner-svn-src-all@FreeBSD.ORG Fri Dec 14 21:41:09 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 6E238F57; Fri, 14 Dec 2012 21:41:09 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 2806C8FC0C; Fri, 14 Dec 2012 21:41:09 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 051BA8AE; Fri, 14 Dec 2012 22:39:04 +0100 (CET) Date: Fri, 14 Dec 2012 22:42:47 +0100 From: Pawel Jakub Dawidek To: John Baldwin Subject: Re: svn commit: r244154 - head/bin/ps Message-ID: <20121214214246.GB1411@garage.freebsd.pl> References: <201212121545.qBCFj4Hl086444@svn.freebsd.org> <20121212210652.GO3013@kib.kiev.ua> <20121213111240.GB1381@garage.freebsd.pl> <201212141152.15567.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZfOjI3PrQbgiZnxM" Content-Disposition: inline In-Reply-To: <201212141152.15567.jhb@freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org 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: Fri, 14 Dec 2012 21:41:09 -0000 --ZfOjI3PrQbgiZnxM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 u= sing local > > > > define. > > > It is pid_max, not max_pid. > > >=20 > > > But the change is wrong. The kern.pid_max only limits newly allocated= pids, > > > it does not magically moves existing pids, which are out of range, to= the > > > limited region. See the corresponding commit log for the description. > > > It was added to make it easier to run FreeBSD 1.x binaries on the mod= ern > > > 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 ke= rnel > with a different PID_MAX. I would much rather our tools learn such const= ants > 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 never > changes) and use that in ps, etc. 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 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --ZfOjI3PrQbgiZnxM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlDLnVYACgkQForvXbEpPzSTAwCg96tGrW/MyHpz59C7IQNwGwWj FYcAoOkeZJH+iA/7ol/2zM1xxn5bU7hU =tITq -----END PGP SIGNATURE----- --ZfOjI3PrQbgiZnxM--