Re: cgroups(7): documenting cgroups v2 thread mode
From: Michael Kerrisk (man-pages)
Date: Tue Jan 09 2018 - 17:54:18 EST
On 01/09/2018 10:10 PM, Tejun Heo wrote:
> Hello,
>
> On Tue, Jan 02, 2018 at 07:24:01PM +0100, Michael Kerrisk (man-pages) wrote:
>> 2. We write the string "threaded" to each of the domain invalid
>> cgroups under y, in order to convert them to the type
>> threaded. As a consequence of this step, all threads under
>> the threaded root now have the type threaded and the
>> threaded subtree is now fully usable. The requirement to
>> write "threaded" to each of these cgroups is somewhat cumâ
>> bersome, but allows for possible future extensions to the
>> thread-mode model.
>>
>> âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
>> âFIXME â
>> âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
>> âRe the preceding paragraphs... Are there other reaâ â
>> âsosn for the (cumbersome) requirement to write â
>> â'threaded' to each of the cgroup.type files in the â
>> âthreaded subtrees? Tejun Heo mentioned the followâ â
>> âing: â
>> â â
>> â Consistency w/ the cgroups right under the root â
>> â cgroup. Because they can be both domains and â
>> â threadroots, we can't switch the children over â
>> â to thread mode automatically. Doing that for â
>> â cgroups further down in the hierarchy would be â
>> â really inconsistent. â
>> â â
>> âBut, it's not clear to me how "Doing that for â
>> âcgroups further down in the hierarchy would be â
>> âreally inconsistent", since in the current implemenâ â
>> âtation, those same thread groups are converted to â
>> â"domain invalid" type. What am I missing? â
>> âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
>
> Yeah, I was confused with an earlier varient where we were marking
> threaded domains instead of threaded roots. It's mostly about future
> extensibility (especially as Waiman was proposing related changes
> there) and not doing things automatically / recursively if possible.
>
> Looks good to me.
One more thing. I added the following sentence to the text:
The cgroup.threads file is writable only for the cgroups inside a
threaded subtree.
Can you confirm that that is correct, please.
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/