From owner-freebsd-current@FreeBSD.ORG Sun Feb 17 04:17:11 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 543BBFCE; Sun, 17 Feb 2013 04:17:11 +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 DD6198E6; Sun, 17 Feb 2013 04:17:10 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r1H4H67j006222; Sun, 17 Feb 2013 06:17:06 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r1H4H67j006222 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r1H4H64D006221; Sun, 17 Feb 2013 06:17:06 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 17 Feb 2013 06:17:06 +0200 From: Konstantin Belousov To: Davide Italiano Subject: Re: Running out of bits p_flag (sys/sys/proc.h) Message-ID: <20130217041706.GA2522@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="j+blFMWKY/m72zgp" Content-Disposition: inline In-Reply-To: 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: freebsd-current , hiren panchasara X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 17 Feb 2013 04:17:11 -0000 --j+blFMWKY/m72zgp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 17, 2013 at 04:25:22AM +0100, Davide Italiano wrote: > On Sun, Feb 17, 2013 at 2:58 AM, hiren panchasara > wrote: > > With revision=3D246484, it seems we have hit the limit. > > At $WORK we have one more flag and to accommodate that we need to bump = this up. > > > > Can p_flag be bumped up to u_long? > > > > Index: proc.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- proc.h (revision 245937) > > +++ proc.h (working copy) > > @@ -497,7 +497,7 @@ > > * The following don't make too much sense. > > * See the td_ or ke_ versions of the same flags. > > */ > > - int p_flag; /* (c) P_* flags. */ > > + u_long p_flag; /* (c) P_* flags. */ > > enum { > > PRS_NEW =3D 0, /* In creation */ > > PRS_NORMAL, /* threads can be run. */ > > > > Thanks, > > Hiren > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.o= rg" >=20 > I see at least two problems here: > - The change you propose may result in a KBI breakage. > - sizeof(unsigned long) =3D=3D 4 on some archs, e.g. my i386 Atom, which > makes the change uneffective. You are right. The solution is to add one more flags member, e.g. p_flag2. They are free. The issue I see with the approach, is with the kinfo and userspace reporting of the flag2. I think that some uninteresting (for usermode) flag could be moved to flag2 outright. --j+blFMWKY/m72zgp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRIFnBAAoJEJDCuSvBvK1BwgUP/RNb0Uk0IU/YD5U201rdjDZE OKdtlZKMSjkvRtc2Bmu6gHErJeYcS2evQ1v9bPEevS+38/OcJhbX219W4DKZUTsb KfJUVFTGL65hz5pgGgttguus6G9TQYmdTq6aJuamFTvzdWXazFGZtb4YcNk6x+Ao JX8qNGYUaRXg8CvZLtd1KVmlT8qstRswAbRPZopdAlhFK/Q64xAaAvnEHR89xkkw xGT9IT/ylUnln9Gjb9etMwxCTzHaER2GNufp+vnOWbYKXbWkA4jt1B8+vSwbLWjl rvLF83HJoju/xp/wrJ3jbrpHG75VF882zX1UE4Uv/3Sv9LrwLbs5fWVSRqciKgZQ u2PrdIUAq5CqZ9YLNV8+kxq2U0BU9XPY5x3eZ+T++4+bystHKe5lZRT1G5Fd5l0j uN82XepGzgEhzvDZoJuKec/l2Yn8jLo8GaCiXu/0rp/rC5dpatnBPqVQ9+lAII+2 rQw6KLZI0T8HC/1NKB8GPgzagSzMzxr1SEQUFHIAfvUQHOtEgq1LznukxH0Oz9cG Yl2uBvd/uG4nXavip4xhyfEocmiYBk0nvqjUYzFsucsngnijfJVQ6adCT4vs5yHo 8ck8xV+6yaVouVKX8jNbuKehS+RPQ1ASmFF3g3pXbQT6AVgbH/+5SfRbYmz6jc05 h/vhc7ZMmZdKSQYVFMB/ =nvSg -----END PGP SIGNATURE----- --j+blFMWKY/m72zgp--