Skip to content

cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit()

Oleg Nesterov cgroups lkml 1 version Applied

Status from this message: Applied to cgroup/for-6.11.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/1cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit()kernel/cgroup/cgroup.c+9 -51 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit()

Hello,

Sorry for delay and for confusing you in our previous discussion here https://lore.kernel.org/all/[email protected]/

No, cgroup_exit() can't rely on group_dead, this is racy.

And no, we can't shift css_set_skip_task_iters/etc from cgroup_release() to cgroup_exit(), an execing sub-thread can change the group leader.

Let me at least send the simple patch which looks "obviously good" to me.

I would really like to remove the usage of signal->live in cgroup.c, but so far I do not see a simple solution.

With or without this change cgroup.procs can be empty but cgroup.threads is not. But at least the exiting sub-threads which have already passed atomic_dec_and_test() should call cgroup_exit() "soon".

Oleg.