Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2020 23:13:11 -0600
From:      Kyle Evans <kevans@freebsd.org>
Cc:        James Gritton <jamie@freebsd.org>, freebsd-jail <freebsd-jail@freebsd.org>
Subject:   Re: cpuset/jail creation
Message-ID:  <CACNAnaGet5_67dQUwYQndXH_esuW4dhS6%2BENcsEjEvBj7kDROw@mail.gmail.com>
In-Reply-To: <CACNAnaF1U_R5wNrLyDc2KkdzsgmyWVeewrrOs4w7J-8vVUoC4g@mail.gmail.com>
References:  <CACNAnaFC4fhYTC7T3zWzEsHO=M-7Ny9KNxh47-Jdi_4yha%2BzZg@mail.gmail.com> <08c97ed86c3d64fea1cedbc111841b7a@freebsd.org> <CACNAnaF1U_R5wNrLyDc2KkdzsgmyWVeewrrOs4w7J-8vVUoC4g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 19, 2020 at 10:56 PM Kyle Evans <kevans@freebsd.org> wrote:
>
> [... snip ...]
>
> On the other hand, let's go the other way with it: say I have a
> process based on cpuset 1 and just a different affinity, so the one
> thread has an anonymous cpuset based on the mother of all prison0
> processes. With the above patch applied, it suddenly gets its own
> numbered cpuset [**].
>
> [... snip ...]
>
> [**] I think this particular issue can be easily addressed by walking
> through all of the threads in the process one more time, just before
> we allocate a new base cpuset for it if we're going to. If every
> thread has an anonymous set, then we can simply avoid creating a new
> base for it and just keep the existing behavior, which will do the
> right thing -- create a new anonymous set hanging off of the jail's
> root. The jail's root set can be modified by real root, so from that
> perspective nothing has changed.

It turns out this isn't quite right, and we're a tad inconsistent:
prison0 processes don't inherently get its root cpuset, while other
jails' processes do. The above should have been "every thread has
either an anonymous set or the root set", but we can't do that, so
instead: "anonymous set, the root set, or the default set (i.e.
thread0's)"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaGet5_67dQUwYQndXH_esuW4dhS6%2BENcsEjEvBj7kDROw>