From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: mingo@kernel.org, peterz@infradead.org,
vincent.guittot@linaro.org, linux-kernel@vger.kernel.org
Cc: sshegde@linux.ibm.com, kprateek.nayak@amd.com,
juri.lelli@redhat.com, vschneid@redhat.com, tglx@linutronix.de,
dietmar.eggemann@arm.com, frederic@kernel.org,
longman@redhat.com
Subject: [PATCH 2/2] sched/fair: get this cpu once in find_new_ilb
Date: Thu, 19 Mar 2026 12:23:14 +0530 [thread overview]
Message-ID: <20260319065314.343932-3-sshegde@linux.ibm.com> (raw)
In-Reply-To: <20260319065314.343932-1-sshegde@linux.ibm.com>
smp_processor_id() is pointless to fetch in the loop. Move it out.
No functional change.
Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
---
kernel/sched/fair.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 02cca2c7a98d..9e561c1234b2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -12635,11 +12635,11 @@ static inline int on_null_domain(struct rq *rq)
*/
static inline int find_new_ilb(struct cpumask *cpus)
{
+ int this_cpu = smp_processor_id();
int ilb_cpu;
for_each_cpu(ilb_cpu, cpus) {
-
- if (ilb_cpu == smp_processor_id())
+ if (ilb_cpu == this_cpu)
continue;
if (idle_cpu(ilb_cpu))
--
2.43.0
next prev parent reply other threads:[~2026-03-19 6:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 6:53 [PATCH 0/2] sched/fair: Minor improvements while triggering idle load balance Shrikanth Hegde
2026-03-19 6:53 ` [PATCH 1/2] sched/fair: consider hk_mask early in triggering ilb Shrikanth Hegde
2026-03-19 8:15 ` Mukesh Kumar Chaurasiya
2026-03-19 13:13 ` Shrikanth Hegde
2026-03-19 22:58 ` Shubhang Kaushik
2026-03-20 2:47 ` Shrikanth Hegde
2026-03-20 3:37 ` K Prateek Nayak
2026-03-20 9:19 ` Shrikanth Hegde
2026-03-20 11:43 ` Peter Zijlstra
2026-03-20 14:12 ` Shrikanth Hegde
2026-03-20 14:28 ` Shrikanth Hegde
2026-03-19 6:53 ` Shrikanth Hegde [this message]
2026-03-19 8:18 ` [PATCH 2/2] sched/fair: get this cpu once in find_new_ilb Mukesh Kumar Chaurasiya
2026-03-19 9:20 ` Peter Zijlstra
2026-03-19 13:03 ` Shrikanth Hegde
2026-03-19 13:39 ` Peter Zijlstra
2026-03-20 3:40 ` K Prateek Nayak
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=20260319065314.343932-3-sshegde@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox