From: Andrea Righi <arighi@nvidia.com>
To: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Christian Loehle <christian.loehle@arm.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Phil Auld <pauld@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair: Prefer fully idle cores for NOHZ balancing
Date: Wed, 29 Jul 2026 16:25:33 +0200 [thread overview]
Message-ID: <amoNXWD8Z60itMsq@gpd4> (raw)
In-Reply-To: <f20edbbd-ee06-4b0d-bf33-294c129827c7@amd.com>
On Wed, Jul 29, 2026 at 04:09:05PM +0530, K Prateek Nayak wrote:
...
> >> It is safe to use "select_rq_mask" here since this is the tick handler
> >> trying to find an ilb_cpu and "select_rq_mask" is only used in contexts
> >> with IRQs disabled. It can probably be renamed to suggest that it is
> >> safe to be used in any IRQ disabled context as a temporary mask.
> >>
> >> Thoughts?
> >
> > Agreed. We can also add lockdep_assert_irqs_disabled() to find_new_ilb() to
> > better document and verify the condition that makes reusing select_rq_mask safe.
>
> That works too but it just looks a bot odd to have the selectrq_mask in
> a load balancing function.
Ack.
>
> >
> > Speaking of that, instead of renaming it, would it be better to provide a helper
> > to access select_rq_mask with lockdep_assert_irqs_disabled()?
>
> I'll defer to Peter on that :-)
>
> He had previously suggested renaming it when there were discussions to
> reuse it here
> https://lore.kernel.org/lkml/20260320114312.GB3558198@noisy.programming.kicks-ass.net/
Thanks for the pointer! Looking at that discussion, this seems broader than a
simple mechanical rename and it doesn't appear to have converged on a concrete
interface. It looks like a useful but independent scheduler cleanup and I'd
prefer not to make it a prerequisite for this.
Maybe for v2 I can keep the existing select_rq_mask, add
lockdep_assert_irqs_disabled() and implement your suggestion. Results are
looking good so far on my side with your change.
Peter, do you have a preference on whether the mask renaming/accessor work
should be addressed separately, or included as a preparatory patch for this?
Thanks,
-Andrea
next prev parent reply other threads:[~2026-07-29 14:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 21:44 [PATCH] sched/fair: Prefer fully idle cores for NOHZ balancing Andrea Righi
2026-07-29 8:18 ` K Prateek Nayak
2026-07-29 9:35 ` Andrea Righi
2026-07-29 10:39 ` K Prateek Nayak
2026-07-29 10:56 ` Shrikanth Hegde
2026-07-29 14:25 ` Andrea Righi [this message]
2026-07-29 14:51 ` Peter Zijlstra
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=amoNXWD8Z60itMsq@gpd4 \
--to=arighi@nvidia.com \
--cc=bsegall@google.com \
--cc=christian.loehle@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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.