From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 3 19:32:10 2014 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 997B3DB4; Tue, 3 Jun 2014 19:32:10 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39C512E5B; Tue, 3 Jun 2014 19:32:10 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s53JW56R099229; Tue, 3 Jun 2014 22:32:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s53JW56R099229 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.8/Submit) id s53JW5mu099228; Tue, 3 Jun 2014 22:32:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 3 Jun 2014 22:32:05 +0300 From: Konstantin Belousov To: "Alexander V. Chernikov" Subject: Re: Permit init(8) use its own cpuset group. Message-ID: <20140603193205.GX3991@kib.kiev.ua> References: <538C8F9A.4020301@FreeBSD.org> <20140602164850.GS3991@kib.kiev.ua> <538E104D.3000904@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hNtiuZBcYkRjyNT4" Content-Disposition: inline In-Reply-To: <538E104D.3000904@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 19:32:10 -0000 --hNtiuZBcYkRjyNT4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 03, 2014 at 10:13:33PM +0400, Alexander V. Chernikov wrote: > On 02.06.2014 20:48, Konstantin Belousov wrote: > > On Mon, Jun 02, 2014 at 06:52:10PM +0400, Alexander V. Chernikov wrote: > >> Hello list! > >> > >> Currently init(8) uses group 1 which is root group. > >> Modifications of this group affects both kernel and userland threads. > >> Additionally, such modifications are impossible, for example, in prese= nce > >> of multi-queue NIC drivers (like igb or ixgbe) which binds their threa= ds to > >> particular cpus. > >> > >> Proposed change ("init_cpuset" loader tunable) permits changing cpu > >> masks for > >> userland more easily. Restricting user processes to migrate to/from CPU > >> cores > >> used for network traffic processing is one of the cases. > >> > >> Phabricator: https://phabric.freebsd.org/D141 (the same version attach= ed > >> inline) > >> > >> If there are no objections, I'll commit this next week. > > Why is the tunable needed ? IMO it is more reasonable to create a new > > cpuset always, at least I cannot explain why the existing behaviour > Initially I've planned to make this behavior to be default. However I=20 > though someone > will complain on changing defaults. That's why I've introduced the=20 > tunable for that. >=20 > > is useful. If creating new cpuset unconditionally, you could consider > > doing it in kernel in start_init(). You would also need to update the > > cpuset(2) man page, which states that cpuset 1 is set for all processes. > Please take a look on the new version doing this (also updated in=20 > phabricator, > https://phabric.freebsd.org/D141 ). Code changes look fine. For the documentation changes, I find the formulation like 'userland processes are started in set 2.' incorrect. It would be cleaner to state that init(8) process is created by kernel with set 2 assigned. I also suggest to wait some more before committing the change, for possible complains from people who do know the reason to do it in the way of your first patch. --hNtiuZBcYkRjyNT4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTjiK0AAoJEJDCuSvBvK1BhH0QAIHZ/Zx0ROzFqImhHoK8IDpO oMGW9z9+uhokfQu06lNDdkRion03aH/AlXm0JY0JA1HzZoKXDVUKxziV+qy5H13b rMHSZVO6ts7W9H826idnvGzO+O69BwkOtlIAA5ajbcwxzkopDs9SmbDkvaCUOiIM y/5SLD36gIPBERs+9RS9Z6zuYPcqNmIJcqBvaXHSxLf7RGuF0aWk8xQDlmjaK3p2 LZK8DmCG12gmWq+OcCw6gzSa28uPZdSciZsuiOw3+Wdbd9/c7aqZXVd2+SzIfurp EUwX21V/UGn9iMMsnKPMBf0EzC0gbndviFXaf6WPhW2vrzWYREqDByBZEGYQ3NxS yIefrUgFDeOAsxIR3SPi4A+DyTMu4BwMK9WnLXIVBWcxHruWx0fOOky53HAsvKMP p9hKpaZrA8qyar7Au4ZRfzGjNdg/MgpXL6aVOg043NSsszd8gPrjQFNtBm3Oun8a v7BdMp/Wfjr/jbMyxMFgZtuOc5w/rk1+fMPOyjRuveCCbiS2BYPFyYL8S5sPkN/j wQtKaM+HYt98sh3aKkzV/b72O2Yfm1Lb26rVnLdpd51js3orujyPx9BxUXTYq24A EGH53SOaWmc2a0my26meK+YwNW6QxXngELcHWUTLX4h4sogMDpx0seufTdsi8tY+ /ma0uiiD8nGUz7miDOFE =i492 -----END PGP SIGNATURE----- --hNtiuZBcYkRjyNT4--