public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit()
@ 2024-06-17 14:31 Oleg Nesterov
  2024-06-17 14:31 ` [PATCH 1/1] " Oleg Nesterov
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2024-06-17 14:31 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Zefan Li, Johannes Weiner, cgroups, linux-kernel

Hello,

Sorry for delay and for confusing you in our previous discussion
here https://lore.kernel.org/all/20240610105028.GA21586@redhat.com/

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-19 17:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 14:31 [PATCH 0/1] cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit() Oleg Nesterov
2024-06-17 14:31 ` [PATCH 1/1] " Oleg Nesterov
2024-06-19 17:33   ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox