[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250625191108.1646208-4-sshegde@linux.ibm.com>
Date: Thu, 26 Jun 2025 00:41:02 +0530
From: Shrikanth Hegde <sshegde@...ux.ibm.com>
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, tglx@...utronix.de, yury.norov@...il.com,
maddy@...ux.ibm.com
Cc: sshegde@...ux.ibm.com, vschneid@...hat.com, dietmar.eggemann@....com,
rostedt@...dmis.org, kprateek.nayak@....com, huschle@...ux.ibm.com,
srikar@...ux.ibm.com, linux-kernel@...r.kernel.org,
christophe.leroy@...roup.eu, linuxppc-dev@...ts.ozlabs.org,
gregkh@...uxfoundation.org
Subject: [RFC v2 3/9] sched/core: Dont allow to use CPU marked as avoid
Don't allow the CPU marked as avoid. This is used when task is pushed out
of a CPU marked as avoid in select_fallback_rq
Signed-off-by: Shrikanth Hegde <sshegde@...ux.ibm.com>
---
kernel/sched/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 0e3a00e2a2cc..13e44d7a0b90 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2437,6 +2437,10 @@ static inline bool is_cpu_allowed(struct task_struct *p, int cpu)
if (cpu_dying(cpu))
return false;
+ /* CPU marked as avoid, shouldn't chosen to run any task*/
+ if (cpu_avoid(cpu))
+ return false;
+
/* But are allowed during online. */
return cpu_online(cpu);
}
--
2.43.0
Powered by blists - more mailing lists