Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1690328

Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support

From Waiman Long <longman@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support
Date 2017-07-18 16:40 +0200
Message-ID <u4BPj-3zB-9@gated-at.bofh.it> (permalink)
References <u43DZ-7fA-3@gated-at.bofh.it> <u43DY-7fA-1@gated-at.bofh.it> <u4f2q-69R-41@gated-at.bofh.it> <u4lhv-1tE-9@gated-at.bofh.it>
Organization Red Hat

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHSET for-4.13] cgroup: implement cgroup2 thread mode, v3 Tejun Heo <tj@kernel.org> - 2017-07-17 04:10 +0200
  [PATCH 2/6] cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS Tejun Heo <tj@kernel.org> - 2017-07-17 04:10 +0200
  [PATCH 1/6] cgroup: reorganize cgroup.procs / task write path Tejun Heo <tj@kernel.org> - 2017-07-17 04:10 +0200
  [PATCH 3/6] cgroup: introduce cgroup->dom_cgrp and threaded css_set handling Tejun Heo <tj@kernel.org> - 2017-07-17 04:10 +0200
  [PATCH 6/6] cgroup: update debug controller to print out thread mode information Tejun Heo <tj@kernel.org> - 2017-07-17 04:10 +0200
    Re: [PATCH 6/6] cgroup: update debug controller to print out thread  mode information Waiman Long <longman@redhat.com> - 2017-07-17 23:20 +0200
      Re: [PATCH 6/6] cgroup: update debug controller to print out thread  mode information Tejun Heo <tj@kernel.org> - 2017-07-19 17:40 +0200
        Re: [PATCH 6/6] cgroup: update debug controller to print out thread  mode information Waiman Long <longman@redhat.com> - 2017-07-19 17:50 +0200
          Re: [PATCH 6/6] cgroup: update debug controller to print out thread  mode information Tejun Heo <tj@kernel.org> - 2017-07-19 17:50 +0200
  [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-17 04:10 +0200
    Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Peter Zijlstra <peterz@infradead.org> - 2017-07-17 16:20 +0200
      Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-17 16:30 +0200
        Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Peter Zijlstra <peterz@infradead.org> - 2017-07-18 19:30 +0200
          Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Waiman Long <longman@redhat.com> - 2017-07-18 19:40 +0200
          Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-18 20:00 +0200
            Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Peter Zijlstra <peterz@infradead.org> - 2017-07-18 20:50 +0200
              Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-18 20:50 +0200
                Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Peter Zijlstra <peterz@infradead.org> - 2017-07-19 16:10 +0200
                Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-19 18:40 +0200
      Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Waiman Long <longman@redhat.com> - 2017-07-17 23:00 +0200
        Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Waiman Long <longman@redhat.com> - 2017-07-18 16:40 +0200
          Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-18 19:20 +0200
            Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Waiman Long <longman@redhat.com> - 2017-07-18 19:30 +0200
              Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-19 18:30 +0200
                Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Waiman Long <longman@redhat.com> - 2017-07-19 19:10 +0200
                Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-19 19:50 +0200
    Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Waiman Long <longman@redhat.com> - 2017-07-17 23:20 +0200
      Re: [PATCH 5/6] cgroup: implement cgroup v2 thread support Tejun Heo <tj@kernel.org> - 2017-07-19 17:50 +0200
  [PATCH 4/6] cgroup: implement CSS_TASK_ITER_THREADED Tejun Heo <tj@kernel.org> - 2017-07-17 04:10 +0200
  Re: [PATCHSET for-4.13] cgroup: implement cgroup2 thread mode, v3 Waiman Long <longman@redhat.com> - 2017-07-17 16:50 +0200
    Re: [PATCHSET for-4.13] cgroup: implement cgroup2 thread mode, v3 Tejun Heo <tj@kernel.org> - 2017-07-17 17:00 +0200

csiph-web