Page MenuHomeFreeBSD

kern: jail: allow specifying a cpuset.parent at creation time
Needs ReviewPublic

Authored by kevans on Sat, Dec 6, 4:13 AM.

Details

Reviewers
olce
markj
Group Reviewers
Jails
manpages
Summary

This allows for different cpuset topologies than the default scheme,
which creates every jail's cpuset root parented to the jail that created
it. Notably, this would make it easier to do schemes like PR 253724,
where the user depicts creating an init_script so that they can have
prison0 user processes running on a different disjoint set of cores than
on jails that they create.

The init_script is necessary there because any jail will inherit
restrictions placed on the prison, so they have to catch init(8) before
it starts spawning off other processes.

With this change, their init_script could become obsolete if they don't
have scenarios where they still want to allocate some of the cores not
traditionally used by prison0 to processes within. They would instead
modify prison0's cpuset to reflect reality and create new jails that
instead use the root set (0) to derive their new constraints from.

This notably does not prevent the parent jail from administering the
child. In the event that root is attaching to a jail with a disjoint
set, it would hit an EDEADLK and inherit the target's set instead since
it has the privilege to widen its affinity.

Relnotes: yes

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69096
Build 65979: arc lint + arc unit