mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
b636fd38dc
commit
c03cd7738a
3 changed files with 39 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue