lkml.org 
[lkml]   [2017]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/6] cgroup: implement cgroup v2 thread support
From
Date
On 07/17/2017 04:56 PM, Waiman Long wrote:
> On 07/17/2017 10:14 AM, Peter Zijlstra wrote:
>> On Sun, Jul 16, 2017 at 10:07:20PM -0400, Tejun Heo wrote:
>>> v4: - Updated to marking each cgroup threaded as suggested by PeterZ.
>>>
>>> +On creation, a cgroup is always a domain cgroup and can be made
>>> +threaded by writing "threaded" to the "cgroup.type" file. The
>>> +operation is single direction::
>>> +
>>> + # echo threaded > cgroup.type
>>> +
>>> +Once threaded, the cgroup can't be made a domain again. To enable the
>>> +thread mode, the following conditions must be met.
>>> +
>>> +- As the cgroup will join the parent's resource domain. The parent
>>> + must either be a valid (threaded) domain or a threaded cgroup.
>>> +
>>> +- The cgroup must be empty. No enabled controllers, child cgroups or
>>> + processes.
>>> +
>>> +Topology-wise, a cgroup can be in an invalid state. Please consider
>>> +the following toplogy::
>>> +
>>> + A (threaded domain) - B (threaded) - C (domain, just created)
>>> +

Thinking about it some more. There is a place for invalid domain. It is
not the child of a threaded cgroup. It is the siblings of a threaded
cgroup whose parent is not root.

Root - A (domain) - B (domain)
\ C (domain)

With "echo threaded > B/cgroup.type":

Root - A (threaded domain) - B (threaded)
\ C (domain, invalid)

Any children of a threaded cgroup should be threaded.

Cheers,
Longman

\
 
 \ /
  Last update: 2017-07-18 16:38    [W:0.091 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site