From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, tglx@linutronix.de,
yury.norov@gmail.com, maddy@linux.ibm.com
Cc: sshegde@linux.ibm.com, vschneid@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
jstultz@google.com, kprateek.nayak@amd.com,
huschle@linux.ibm.com, srikar@linux.ibm.com,
linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk
Subject: [RFC PATCH 3/5] sched/fair: Don't use parked cpu for load balancing
Date: Fri, 23 May 2025 23:44:46 +0530 [thread overview]
Message-ID: <20250523181448.3777233-4-sshegde@linux.ibm.com> (raw)
In-Reply-To: <20250523181448.3777233-1-sshegde@linux.ibm.com>
While doing load balance, don't consider the parked CPUs. As far as load
balance is considered, a parked CPU is as good as offline CPU.
Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
---
kernel/sched/fair.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 125912c0e9dd..f48f55ca1522 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -11761,6 +11761,7 @@ static int sched_balance_rq(int this_cpu, struct rq *this_rq,
};
cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
+ cpumask_andnot(cpus, cpus, cpu_parked_mask);
schedstat_inc(sd->lb_count[idle]);
--
2.39.3
next prev parent reply other threads:[~2025-05-23 18:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 18:14 [RFC PATCH 0/5] sched: cpu parked and push current task mechanism Shrikanth Hegde
2025-05-23 18:14 ` [RFC PATCH 1/5] cpumask: Introduce cpu parked mask Shrikanth Hegde
2025-05-27 15:06 ` Yury Norov
2025-06-23 8:10 ` Shrikanth Hegde
2025-05-23 18:14 ` [RFC PATCH 2/5] sched/core: Don't use parked cpu for selection Shrikanth Hegde
2025-05-27 14:59 ` Yury Norov
2025-05-27 17:35 ` Shrikanth Hegde
2025-05-23 18:14 ` Shrikanth Hegde [this message]
2025-05-23 18:14 ` [RFC PATCH 4/5] sched/core: Push current task when cpu is parked Shrikanth Hegde
2025-05-23 18:14 ` [DEBUG PATCH 5/5] powerpc: Use manual hint for cpu parking Shrikanth Hegde
2025-05-27 15:10 ` [RFC PATCH 0/5] sched: cpu parked and push current task mechanism Peter Zijlstra
2025-05-27 15:47 ` Yury Norov
2025-05-27 17:30 ` Shrikanth Hegde
2025-06-02 4:25 ` Shrikanth Hegde
2025-06-02 14:22 ` Tobias Huschle
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=20250523181448.3777233-4-sshegde@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=dietmar.eggemann@arm.com \
--cc=huschle@linux.ibm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=maddy@linux.ibm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yury.norov@gmail.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
all inboxes | Powered by JetHome®