From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Tejun Heo <tj@kernel.org>
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 v3 cgroup/for-7.0-fixes] cgroup: Fix cgroup_drain_dying() testing the wrong condition
Date: Wed, 1 Apr 2026 15:27:34 +0200 [thread overview]
Message-ID: <20260401132734.QQ8M2KA2@linutronix.de> (raw)
In-Reply-To: <acbmKQR9hSGhLBmh@slm.duckdns.org>
On 2026-03-27 10:18:49 [-1000], Tejun Heo wrote:
> On Thu, Mar 26, 2026 at 08:35:11AM +0100, Sebastian Andrzej Siewior wrote:
> > @@ -7141,7 +7143,7 @@ void cgroup_task_dead(struct task_struct *task)
> > {
> > get_task_struct(task);
> > llist_add(&task->cg_dead_lnode, this_cpu_ptr(&cgrp_dead_tasks));
> > - irq_work_queue(this_cpu_ptr(&cgrp_dead_tasks_iwork));
> > + schedule_delayed_work(this_cpu_ptr(&cgrp_delayed_tasks_iwork), HZ);
>
> Can you try schedule_delayed_work_on(smp_processor_id(), ...)?
> schedule_delayed_work() is using a percpu workqueue but the delay timer can
> still migrate.
So, this works and I should have known about this. Well. No more race
then.
This keeps the option open to switch to queue_work() if this approach
ends up problematic for isolated CPU folks.
Thanks.
> Thanks.
>
Sebastian
next prev parent reply other threads:[~2026-04-01 13:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 17:23 [PATCH v3 cgroup/for-7.0-fixes] cgroup: Fix cgroup_drain_dying() testing the wrong condition Tejun Heo
2026-03-25 17:30 ` Tejun Heo
2026-03-25 18:06 ` Sebastian Andrzej Siewior
2026-03-26 0:02 ` Tejun Heo
2026-03-26 7:35 ` Sebastian Andrzej Siewior
2026-03-27 20:18 ` Tejun Heo
2026-04-01 13:27 ` Sebastian Andrzej Siewior [this message]
[not found] <20260325172348.1836430-1-tj@kernel.org>
2026-03-26 0:09 ` 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=20260401132734.QQ8M2KA2@linutronix.de \
--to=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 \
--cc=tj@kernel.org \
/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