Re: [PATCH v2 -next] cgroup: remove offline draining in root destruction to avoid hung_tasks
From: Hillf Danton
Date: Fri Aug 15 2025 - 20:58:01 EST
On Sat, 16 Aug 2025 08:33:55 +0800 Chen Ridong wrote:
> On 2025/8/15 19:54, Hillf Danton wrote:
> > On Fri, 15 Aug 2025 18:28:53 +0800 Chen Ridong wrote:
> >>
> >> To clarify, when you mentioned "cut max_active off", did you mean setting max_active of
> >> cgroup_destroy_wq to 1?
> >>
> > cgroup_destroy_wq = alloc_workqueue("cgroup_destroy", 0, 0);
>
> Thank you for the additional clarification.
>
> While this modification is functional, I’m concerned it might spawn a significant number of cgroup
> destruction tasks—most of which would contend for cgroup_mutex. Could this waste system resources?
>
No win comes from nothing, so you need to pay $.02 for example at least
for curing the task hung by erasing the root cause.