Date: Tue, 3 Jun 2014 22:32:05 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: "Alexander V. Chernikov" <melifaro@FreeBSD.org> Cc: hackers@freebsd.org Subject: Re: Permit init(8) use its own cpuset group. Message-ID: <20140603193205.GX3991@kib.kiev.ua> In-Reply-To: <538E104D.3000904@FreeBSD.org> References: <538C8F9A.4020301@FreeBSD.org> <20140602164850.GS3991@kib.kiev.ua> <538E104D.3000904@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140603193205.GX3991>