From: Tejun Heo <tj@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
Bert Karwatzki <spasswolf@web.de>,
Michal Koutny <mkoutny@suse.com>,
Johannes Weiner <hannes@cmpxchg.org>,
kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH v2] cgroup: Wait for dying tasks to leave on rmdir
Date: Tue, 24 Mar 2026 10:17:36 -1000 [thread overview]
Message-ID: <acLxYGxkgPYRP94e@slm.duckdns.org> (raw)
In-Reply-To: <20260324090402.k7NkNcEp@linutronix.de>
Hello,
On Tue, Mar 24, 2026 at 10:04:02AM +0100, Sebastian Andrzej Siewior wrote:
...
> As mentioned in the other email, if I
> - irq_work_queue(this_cpu_ptr(&cgrp_dead_tasks_iwork));
> + schedule_delayed_work(this_cpu_ptr(&cgrp_delayed_tasks_iwork), 1 * HZ);
>
> then I hung at boot because it rmdir() a cgroup with a task in Z. It
> might suggest a race because systemd might missed a task.
> But this fixes the other issue so.
Just did 100 boot test w/ 1s delay added as above but the problem didn't
reproduce. Can't reproduce with cgroup create / populate / depopulate /
rmdir stress tests either. I did hit 1s delay propagating through but that
wasn't a dead lock. The code is not great. It'd be better to just keep
css_set_lock held while iterating too.
I'll apply this for now. Can you please try to reproduce the problem with
the patches applied? How reliably does it reproduce? How is it stuck? Are
tasks waiting on the waitq indefinitely with populated stuck at 1?
Thanks.
--
tejun
next prev parent reply other threads:[~2026-03-24 20:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 20:02 Tejun Heo
2026-03-24 9:04 ` Sebastian Andrzej Siewior
2026-03-24 20:17 ` Tejun Heo [this message]
2026-03-25 11:52 ` Sebastian Andrzej Siewior
2026-03-24 20:24 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acLxYGxkgPYRP94e@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=oliver.sang@intel.com \
--cc=spasswolf@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®