From: Breno Leitao <leitao@debian.org>
To: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH] workqueue: read p->wake_cpu once in kick_pool_pick()
Date: Tue, 11 Aug 2026 02:28:56 -0700 [thread overview]
Message-ID: <anrrTDlMk4MIrzZB@gmail.com> (raw)
In-Reply-To: <anoroQ1IxX94STnH@slm.duckdns.org>
On Mon, Aug 10, 2026 at 09:50:57AM -1000, Tejun Heo wrote:
> On Wed, Aug 05, 2026 at 04:17:48AM -0700, Breno Leitao wrote:
> > diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> > index 26d5680c751c6..333752ac38298 100644
> > --- a/kernel/workqueue.c
> > +++ b/kernel/workqueue.c
> > @@ -1308,8 +1308,10 @@ static bool kick_pool_pick(struct worker_pool *pool, struct task_struct **wakep)
> > * If @pool has non-strict affinity, @worker might have ended up outside
> > * its affinity scope. Repatriate.
> > */
> > - if (!pool->attrs->affn_strict &&
> > - !cpumask_test_cpu(p->wake_cpu, pool->attrs->__pod_cpumask)) {
> > + bool wake_cpu_in_pod = cpumask_test_cpu(READ_ONCE(p->wake_cpu),
> > + pool->attrs->__pod_cpumask);
> > +
> > + if (!pool->attrs->affn_strict && !wake_cpu_in_pod) {
>
> Can you update the p->wake_cpu assignement several lines below to
> WRITE_ONCE() too?
Ack, let me update and resend.
Thanks,
--breno
prev parent reply other threads:[~2026-08-11 9:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 11:17 [PATCH] workqueue: read p->wake_cpu once in kick_pool_pick() Breno Leitao
2026-08-05 18:42 ` Bradley Morgan
2026-08-10 19:50 ` Tejun Heo
2026-08-11 9:28 ` Breno Leitao [this message]
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=anrrTDlMk4MIrzZB@gmail.com \
--to=leitao@debian.org \
--cc=jiangshanlai@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.