summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup/cgroup-internal.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2017-05-15 15:34:03 +0200
committerTejun Heo <tj@kernel.org>2017-07-21 17:14:51 +0200
commit450ee0c1feed657894e0b4bdd48f3974af9d394c (patch)
tree9922f55956a546566a61e2e7d395a3a251647375 /kernel/cgroup/cgroup-internal.h
parentcgroup: introduce cgroup->dom_cgrp and threaded css_set handling (diff)
downloadlinux-450ee0c1feed657894e0b4bdd48f3974af9d394c.tar.xz
linux-450ee0c1feed657894e0b4bdd48f3974af9d394c.zip
cgroup: implement CSS_TASK_ITER_THREADED
cgroup v2 is in the process of growing thread granularity support. Once thread mode is enabled, the root cgroup of the subtree serves as the dom_cgrp to which the processes of the subtree conceptually belong and domain-level resource consumptions not tied to any specific task are charged. In the subtree, threads won't be subject to process granularity or no-internal-task constraint and can be distributed arbitrarily across the subtree. This patch implements a new task iterator flag CSS_TASK_ITER_THREADED, which, when used on a dom_cgrp, makes the iteration include the tasks on all the associated threaded css_sets. "cgroup.procs" read path is updated to use it so that reading the file on a proc_cgrp lists all processes. This will also be used by controller implementations which need to walk processes or tasks at the resource domain level. Task iteration is implemented nested in css_set iteration. If CSS_TASK_ITER_THREADED is specified, after walking tasks of each !threaded css_set, all the associated threaded css_sets are visited before moving onto the next !threaded css_set. v2: ->cur_pcset renamed to ->cur_dcset. Updated for the new enable-threaded-per-cgroup behavior. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup/cgroup-internal.h')
0 files changed, 0 insertions, 0 deletions