Permit init(8) use its own cpuset group.

Konstantin Belousov kostikbel at gmail.com
Tue Jun 3 19:32:10 UTC 2014


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 presence
> >> of multi-queue NIC drivers (like igb or ixgbe) which binds their threads 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 attached
> >> 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 
> though someone
> will complain on changing defaults. That's why I've introduced the 
> tunable for that.
> 
> > 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 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140603/c1261c0e/attachment.sig>


More information about the freebsd-hackers mailing list