[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDXTOwRxhrtf5YPi@yury>
Date: Tue, 27 May 2025 10:59:07 -0400
From: Yury Norov <yury.norov@...il.com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, tglx@...utronix.de, maddy@...ux.ibm.com,
vschneid@...hat.com, dietmar.eggemann@....com, rostedt@...dmis.org,
jstultz@...gle.com, kprateek.nayak@....com, huschle@...ux.ibm.com,
srikar@...ux.ibm.com, linux-kernel@...r.kernel.org,
linux@...musvillemoes.dk
Subject: Re: [RFC PATCH 2/5] sched/core: Don't use parked cpu for selection
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@...ux.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?
Powered by blists - more mailing lists