diff options
author | Tejun Heo <tj@kernel.org> | 2019-05-31 20:38:58 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-05-31 20:38:58 +0300 |
commit | c03cd7738a83b13739f00546166969342c8ff014 (patch) | |
tree | 6ac8b0e1001dbfc3c7eb8df089bc500aeeab9a24 /include/linux/cgroup-defs.h | |
parent | b636fd38dc40113f853337a7d2a6885ad23b8811 (diff) | |
download | linux-c03cd7738a83b13739f00546166969342c8ff014.tar.xz |
cgroup: Include dying leaders with live threads in PROCS iterations
CSS_TASK_ITER_PROCS currently iterates live group leaders; however,
this means that a process with dying leader and live threads will be
skipped. IOW, cgroup.procs might be empty while cgroup.threads isn't,
which is confusing to say the least.
Fix it by making cset track dying tasks and include dying leaders with
live threads in PROCS iteration.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-and-tested-by: Topi Miettinen <toiwoton@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'include/linux/cgroup-defs.h')
-rw-r--r-- | include/linux/cgroup-defs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 77258d276f93..1615b9c17e02 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -216,6 +216,7 @@ struct css_set { */ struct list_head tasks; struct list_head mg_tasks; + struct list_head dying_tasks; /* all css_task_iters currently walking this cset */ struct list_head task_iters; |