From nobody Mon Apr 6 16:12:46 2026 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BA1F363C63 for ; Thu, 19 Mar 2026 06:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773903251; cv=none; b=PyGlUBTq4t3Nm0mCBeelsmlJEy5TuNz+lRZvXDwywb94HkzpVWxJkFnzCLtoqpipr8f2qqLhF+GBdV/0t0GW50JKGD0Rb39vvKkwKEGaRuUMtiLpAt2JQDvaADDy6eva774M91qTqd5kRuV5IXCECxhF1DQvjwYSyMaaujXRLrs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773903251; c=relaxed/simple; bh=E2hvtQACi7nCmp+aGEOFPGQbZ2okB0wyZPtHK988AEE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ei5M/IX9ScfTMwg0g0qHLrZ13gDZ0RgsO/Bx2WM42B7WnAp065RRdykLlcbSI/4cILqdxZa4UAFVH5CALhWo3iMhmqHn3QfXihB0qkBS/qZcDSXJyaETqR2Si67HXdIuNl7bD9ljEzb7cHLw3goZPCw4iLzGA1t83c6kjZwdmUk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=FJpg2kWD; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="FJpg2kWD" Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62INxOfe1711869; Thu, 19 Mar 2026 06:53:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=X5kT0RYYoAzTTUj3d PhucOiNGP6QbmdkJ8XdWTP9ZSo=; b=FJpg2kWDK0IEbixXK6qBLt6NYfR+pujKn a4b4gxuodZMkjNYwmA+n8SV141XQGq8WGUpvsE9+m8aGsaBRZ5KpwDLQgMAtOoat f0A6ohTSWIxT4aV6E5pAtvNWufzSH70/5UbAL9lmXpbNTaaTuqwj4P4TEdanZz3q 1+wGDv3MfWrtd6D3KPXA5WNXPL8sKqHUBGVUPUNmXZOBervxwltqjLXszfq/p5J4 muE5g0mrNIuk+oYVQOknpOoz6+boh4LnPoQBFuwBtUKsDuPJ3Ar1rXB9es3SsZJo ZzxfCIj6Zi1q/yKryBH7BvVSQctYgi0F4DclfcISZ4HiK+nVQ76wA== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4cvy64wtdc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 06:53:38 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 62J4j9In032346; Thu, 19 Mar 2026 06:53:37 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4cwm7k16qj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 06:53:37 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 62J6rZlc46727466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Mar 2026 06:53:35 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA4EC2004D; Thu, 19 Mar 2026 06:53:35 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 49CDB20040; Thu, 19 Mar 2026 06:53:33 +0000 (GMT) Received: from li-7bb28a4c-2dab-11b2-a85c-887b5c60d769.ibm.com.com (unknown [9.124.219.158]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Mar 2026 06:53:33 +0000 (GMT) From: Shrikanth Hegde 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 1/2] sched/fair: consider hk_mask early in triggering ilb Date: Thu, 19 Mar 2026 12:23:13 +0530 Message-ID: <20260319065314.343932-2-sshegde@linux.ibm.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260319065314.343932-1-sshegde@linux.ibm.com> References: <20260319065314.343932-1-sshegde@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: nAqr8paX3pVumK4yJLbN59HzWvQULsnU X-Proofpoint-GUID: nAqr8paX3pVumK4yJLbN59HzWvQULsnU X-Authority-Analysis: v=2.4 cv=KYnfcAYD c=1 sm=1 tr=0 ts=69bb9d72 cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=iQ6ETzBq9ecOQQE5vZCe:22 a=VnNF1IyMAAAA:8 a=5uCQAWMke7dwRzLPzQcA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzE5MDA1MSBTYWx0ZWRfX71O9LDOYe35y h2bM/lWLPbzyo5Pa/sTub43ivpnXgKdUtXsqRHepXf3aUSg0oidqleQxdcXl7zvgvS+uwq0Dil0 13a6XgguIa6T3cVeLM3q3Tw5Ja66uQEpi/iz6easgyeDxCAa26L/miSp+mm2+lF4FKgWv2Mz8Zj NbKzoRUsuQmJtLpRiwZctdTOmReTi3AfAGY0cfGvUJXsalObQGnw0xOwbYNcNgi4W3EGyCFfay0 iwhq7VcA2GUwOVTB2akJmWqKQdSsPaJ5SVMOkwDnPtKOt4impG9bRTxhW+WsvqbroeuxqYJCj/W MrsWUYoBACmzIpCq1jyazYG1uhi2CsVv4HXdnskMDv7pZWicmIksS62tAJAbbOfRSfGyUIBjuQS ht+HlYD5HOf9yxs2GbP8MBHaXV2KRMITCQ/D3GwXApUzln9EhfWc000kiRI6bxpKWyt3JoS+CCr ZIx0oIgDV8Yx71OBGGw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-19_01,2026-03-17_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 spamscore=0 impostorscore=0 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603190051 Content-Type: text/plain; charset="utf-8" Current code around nohz_balancer_kick and kick_ilb: 1. Checks for nohz.idle_cpus_mask to see if idle load balance(ilb) is needed. 2. Does a few checks to see if any conditions meet the criteria. 3. Tries to find the idle CPU. But the idle CPU found should be part of housekeeping CPUs. If there is no housekeeping idle CPU, then step 2 is done un-necessarily, since 3 bails out without doing the ilb. Fix that by making the decision early and pass it on to find_new_ilb. Use a percpu cpumask instead of allocating it everytime since this is in fastpath. If flags is set to NOHZ_STATS_KICK since the time is after nohz.next_blocked but before nohz.next_balance and there are idle CPUs which are part of housekeeping, need to copy the same logic there too. While there, fix the stale comments around nohz.nr_cpus Signed-off-by: Shrikanth Hegde --- Didn't add the fixes tag since it addresses more than stale comments. kernel/sched/fair.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b19aeaa51ebc..02cca2c7a98d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7392,6 +7392,7 @@ static inline unsigned int cfs_h_nr_delayed(struct rq= *rq) static DEFINE_PER_CPU(cpumask_var_t, load_balance_mask); static DEFINE_PER_CPU(cpumask_var_t, select_rq_mask); static DEFINE_PER_CPU(cpumask_var_t, should_we_balance_tmpmask); +static DEFINE_PER_CPU(cpumask_var_t, kick_ilb_tmpmask); =20 #ifdef CONFIG_NO_HZ_COMMON =20 @@ -12629,15 +12630,14 @@ static inline int on_null_domain(struct rq *rq) * - When one of the busy CPUs notices that there may be an idle rebalanci= ng * needed, they will kick the idle load balancer, which then does idle * load balancing for all the idle CPUs. + * + * @cpus idle CPUs in HK_TYPE_KERNEL_NOISE housekeeping */ -static inline int find_new_ilb(void) +static inline int find_new_ilb(struct cpumask *cpus) { - const struct cpumask *hk_mask; int ilb_cpu; =20 - hk_mask =3D housekeeping_cpumask(HK_TYPE_KERNEL_NOISE); - - for_each_cpu_and(ilb_cpu, nohz.idle_cpus_mask, hk_mask) { + for_each_cpu(ilb_cpu, cpus) { =20 if (ilb_cpu =3D=3D smp_processor_id()) continue; @@ -12656,7 +12656,7 @@ static inline int find_new_ilb(void) * We pick the first idle CPU in the HK_TYPE_KERNEL_NOISE housekeeping set * (if there is one). */ -static void kick_ilb(unsigned int flags) +static void kick_ilb(unsigned int flags, struct cpumask *cpus) { int ilb_cpu; =20 @@ -12667,7 +12667,7 @@ static void kick_ilb(unsigned int flags) if (flags & NOHZ_BALANCE_KICK) nohz.next_balance =3D jiffies+1; =20 - ilb_cpu =3D find_new_ilb(); + ilb_cpu =3D find_new_ilb(cpus); if (ilb_cpu < 0) return; =20 @@ -12700,6 +12700,7 @@ static void kick_ilb(unsigned int flags) */ static void nohz_balancer_kick(struct rq *rq) { + struct cpumask *ilb_cpus =3D this_cpu_cpumask_var_ptr(kick_ilb_tmpmask); unsigned long now =3D jiffies; struct sched_domain_shared *sds; struct sched_domain *sd; @@ -12715,27 +12716,41 @@ static void nohz_balancer_kick(struct rq *rq) */ nohz_balance_exit_idle(rq); =20 + /* ILB considers only HK_TYPE_KERNEL_NOISE housekeeping CPUs */ + if (READ_ONCE(nohz.has_blocked_load) && - time_after(now, READ_ONCE(nohz.next_blocked))) + time_after(now, READ_ONCE(nohz.next_blocked))) { flags =3D NOHZ_STATS_KICK; + cpumask_and(ilb_cpus, nohz.idle_cpus_mask, + housekeeping_cpumask(HK_TYPE_KERNEL_NOISE)); + } =20 /* - * Most of the time system is not 100% busy. i.e nohz.nr_cpus > 0 - * Skip the read if time is not due. + * Most of the time system is not 100% busy. i.e there are idle + * housekeeping CPUs. + * + * So, Skip the reading idle_cpus_mask if time is not due. * * If none are in tickless mode, there maybe a narrow window * (28 jiffies, HZ=3D1000) where flags maybe set and kick_ilb called. * But idle load balancing is not done as find_new_ilb fails. - * That's very rare. So read nohz.nr_cpus only if time is due. + * That's very rare. So check (idle_cpus_mask & HK_TYPE_KERNEL_NOISE) + * only if time is due. + * */ if (time_before(now, nohz.next_balance)) goto out; =20 + /* Avoid the double computation */ + if (flags !=3D NOHZ_STATS_KICK) + cpumask_and(ilb_cpus, nohz.idle_cpus_mask, + housekeeping_cpumask(HK_TYPE_KERNEL_NOISE)); + /* * None are in tickless mode and hence no need for NOHZ idle load * balancing */ - if (unlikely(cpumask_empty(nohz.idle_cpus_mask))) + if (unlikely(cpumask_empty(ilb_cpus))) return; =20 if (rq->nr_running >=3D 2) { @@ -12767,7 +12782,7 @@ static void nohz_balancer_kick(struct rq *rq) * When balancing between cores, all the SMT siblings of the * preferred CPU must be idle. */ - for_each_cpu_and(i, sched_domain_span(sd), nohz.idle_cpus_mask) { + for_each_cpu_and(i, sched_domain_span(sd), ilb_cpus) { if (sched_asym(sd, i, cpu)) { flags =3D NOHZ_STATS_KICK | NOHZ_BALANCE_KICK; goto unlock; @@ -12820,7 +12835,7 @@ static void nohz_balancer_kick(struct rq *rq) flags |=3D NOHZ_NEXT_KICK; =20 if (flags) - kick_ilb(flags); + kick_ilb(flags, ilb_cpus); } =20 static void set_cpu_sd_state_busy(int cpu) @@ -14253,6 +14268,8 @@ __init void init_sched_fair_class(void) zalloc_cpumask_var_node(&per_cpu(select_rq_mask, i), GFP_KERNEL, cpu_= to_node(i)); zalloc_cpumask_var_node(&per_cpu(should_we_balance_tmpmask, i), GFP_KERNEL, cpu_to_node(i)); + zalloc_cpumask_var_node(&per_cpu(kick_ilb_tmpmask, i), + GFP_KERNEL, cpu_to_node(i)); =20 #ifdef CONFIG_CFS_BANDWIDTH INIT_CSD(&cpu_rq(i)->cfsb_csd, __cfsb_csd_unthrottle, cpu_rq(i)); --=20 2.43.0 From nobody Mon Apr 6 16:12:46 2026 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E56637AA79 for ; Thu, 19 Mar 2026 06:54:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773903253; cv=none; b=ECNmLtIVU3rCxZYUXpEKxDwEzJvfmYgWbOyatYkayL0WeJh1UZIShXUxlrBf1tWZGYzmwZeYbfQGPgkzOj5XRn2VajW4GU0k02p6w3aXm5psDFCqlRzrenfCWL1mIYpMkDB1Qyyet+KlbVLRsQXvCnpix6Wnp9MFQP3YlgazE9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773903253; c=relaxed/simple; bh=+/zue4fLlZoKTRa6FmTwMeTfA753L0LrA1ReYHOvCYs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P4aoDnBcBVVugTAbEYPP/JzvDUBy5bMYmZUUHWPD+dsasXH2iDTXBOVa/Q+Jfuxir/mwqO5hO6mHwuWBtw4A78NguPTr3tQKA+DCI3DlslAPQ6njy1T+WDQoITxrM7UBGVfRwnJy+w/li3ccZvr7OzVoTTNiWeUWlB+wi+XkFPU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=jNSyyMS2; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="jNSyyMS2" Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62INxOff1711869; Thu, 19 Mar 2026 06:53:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=cCClByqs1Ap8mD8jw jesW03jkgTRtAt7T/niosTpqoE=; b=jNSyyMS2b034NSvZpFS3dsWk7362wWfuy Z8SVI8Ejb9Uvvd6h13s4mFQM2mCeoGDbFKclR9gj4jgC9UClxYW+3trtoVFcgTxE hsZYt4J8z/cl48WKXTLPyvtbSh5GYMTIHztZqTitzdN2ml8n6WlK0pW0es+o0oKG 0LFthfrT1i2f4GjUKILp6q/QkTwliR1jNxmus421ne+JTvyoocy8L81uVd6yU+Sj pdi32gJ9jSmK3ZFV55kGpT6P7xhigtVZPTyi6/q4U5pKHX7mLv1mzgqk5/kTECBi FRvWpNsxHobxWYqqBp5rLibTs4WnA+U1mjj7AKPmQpS9u0jfMLJPQ== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4cvy64wtdh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 06:53:40 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 62J33vuN004581; Thu, 19 Mar 2026 06:53:40 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4cwj0shfxp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 06:53:39 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 62J6rceZ10879240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Mar 2026 06:53:38 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F41D2004B; Thu, 19 Mar 2026 06:53:38 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFF9920040; Thu, 19 Mar 2026 06:53:35 +0000 (GMT) Received: from li-7bb28a4c-2dab-11b2-a85c-887b5c60d769.ibm.com.com (unknown [9.124.219.158]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Mar 2026 06:53:35 +0000 (GMT) From: Shrikanth Hegde 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 Message-ID: <20260319065314.343932-3-sshegde@linux.ibm.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260319065314.343932-1-sshegde@linux.ibm.com> References: <20260319065314.343932-1-sshegde@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GQqVSZuxZQNfiSohluSFsw7NgkUO0Fo1 X-Proofpoint-GUID: GQqVSZuxZQNfiSohluSFsw7NgkUO0Fo1 X-Authority-Analysis: v=2.4 cv=KYnfcAYD c=1 sm=1 tr=0 ts=69bb9d75 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=iQ6ETzBq9ecOQQE5vZCe:22 a=VnNF1IyMAAAA:8 a=gfQPMJu-hSpRr0ZdjbEA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzE5MDA1MSBTYWx0ZWRfX0U8gkx0KCcUy uUZ9dltd7CSWFNIvBl16JpwiL4Na8x02PGrO4Rx9SUVaLkQ2P5r4rw3Bf8TMmumJzgvqMreATvI BwBEMZFqWZyxfEod+LT/O6StKjrdWvnzpxyQbhmIMLNQaIFgC0WN8K9TD5vSp8J/nTxBv1hOlfp IvSRmF/+dYxKl1MH+zZ3OCaWa0LEfF4qedqdc72JPHiZcPn973zHg4lZCfrRf1qMR7ZMXqUexrf 91cXnacJPlQLGUSLImxnqVDom51pW4t0ejEXQZP8Pc97ZKfAeK/YzOxD/+t4y5mXhsAnyb0awBQ 7tmartBV8JO3MKLkr4LYK6cIrT5nH2J/TeZDkusdCWRNjtrdq5xqkuxglUF8E5gUTIKLjH8ox/d ILoBa41iBFcTYiZNrxQ3oVUALe+zsXHdbImLFal9iC6Ob/Ex3bGhnhGSQsq64tgSodJnwErRaRA zTdPYRP+zStOVR3RNUQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-19_01,2026-03-17_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 spamscore=0 impostorscore=0 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603190051 Content-Type: text/plain; charset="utf-8" smp_processor_id() is pointless to fetch in the loop. Move it out. No functional change. Signed-off-by: Shrikanth Hegde Reviewed-by: K Prateek Nayak Reviewed-by: Mukesh Kumar Chaurasiya (IBM) --- 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 =3D smp_processor_id(); int ilb_cpu; =20 for_each_cpu(ilb_cpu, cpus) { - - if (ilb_cpu =3D=3D smp_processor_id()) + if (ilb_cpu =3D=3D this_cpu) continue; =20 if (idle_cpu(ilb_cpu)) --=20 2.43.0