From: Yury Norov <yury.norov@gmail.com>
To: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, tglx@linutronix.de,
maddy@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: Re: [RFC PATCH 2/5] sched/core: Don't use parked cpu for selection
Date: Tue, 27 May 2025 10:59:07 -0400 [thread overview]
Message-ID: <aDXTOwRxhrtf5YPi@yury> (raw)
In-Reply-To: <20250523181448.3777233-3-sshegde@linux.ibm.com>
On Fri, May 23, 2025 at 11:44:45PM +0530, Shrikanth Hegde wrote:
> When the current running task is pushed using stop class mechanism, the
> new CPU that going to be chosen shouldn't be a parked CPU.
>
> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
> ---
> kernel/sched/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 62b3416f5e43..9ec12f9b3b08 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3526,7 +3526,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
> nodemask = cpumask_of_node(nid);
>
> /* Look for allowed, online CPU in same node. */
> - for_each_cpu(dest_cpu, nodemask) {
> + for_each_cpu_andnot(dest_cpu, nodemask, cpu_parked_mask) {
> if (is_cpu_allowed(p, dest_cpu))
> return dest_cpu;
> }
> @@ -3534,7 +3534,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
>
> for (;;) {
> /* Any allowed, online CPU? */
> - for_each_cpu(dest_cpu, p->cpus_ptr) {
> + for_each_cpu_andnot(dest_cpu, p->cpus_ptr, cpu_parked_mask) {
> if (!is_cpu_allowed(p, dest_cpu))
> continue;
You test for online and dying CPUs in the is_cpu_allowed(). Why this
new 'parked' creature is different?
next prev parent reply other threads:[~2025-05-27 14:59 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 [this message]
2025-05-27 17:35 ` Shrikanth Hegde
2025-05-23 18:14 ` [RFC PATCH 3/5] sched/fair: Don't use parked cpu for load balancing Shrikanth Hegde
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=aDXTOwRxhrtf5YPi@yury \
--to=yury.norov@gmail.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=sshegde@linux.ibm.com \
--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
all inboxes | Powered by JetHome®