linux-stable/kernel/cgroup
Tejun Heo 450ee0c1fe 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>
2017-07-21 11:14:51 -04:00
..
cgroup-internal.h cgroup: reorganize cgroup.procs / task write path 2017-07-21 11:14:50 -04:00
cgroup-v1.c cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS 2017-07-21 11:14:51 -04:00
cgroup.c cgroup: implement CSS_TASK_ITER_THREADED 2017-07-21 11:14:51 -04:00
cpuset.c cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS 2017-07-21 11:14:51 -04:00
debug.c cgroup: fix lockdep warning in debug controller 2017-06-14 16:01:41 -04:00
freezer.c cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS 2017-07-21 11:14:51 -04:00
Makefile cgroup: Move debug cgroup to its own file 2017-06-14 16:01:21 -04:00
namespace.c kernel: convert cgroup_namespace.count from atomic_t to refcount_t 2017-03-06 14:55:22 -05:00
pids.c cgroup/pids: remove spurious suspicious RCU usage warning 2017-03-06 15:11:29 -05:00
rdma.c rdmacg: Fixed uninitialized current resource usage 2017-01-10 12:52:32 -05:00