diff options
author | Andrea Righi <arighi@nvidia.com> | 2025-03-26 20:18:49 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2025-03-26 10:08:01 -1000 |
commit | 37477d9ecabd15323700313724479bea94d0421e (patch) | |
tree | 4707b5f5e34fbaf0bb5b95975c464f2a9e0c61d7 | |
parent | f6e0150b2003fb2b9265028a618aa1732b3edc8f (diff) |
sched_ext: idle: Fix return code of scx_select_cpu_dfl()
Return -EBUSY when using %SCX_PICK_IDLE_CORE with scx_select_cpu_dfl()
if a fully idle SMT core cannot be found, instead of falling back to
@prev_cpu, which is not a fully idle SMT core in this case.
Fixes: c414c2171cd9e ("sched_ext: idle: Honor idle flags in the built-in idle selection policy")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/sched/ext_idle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c index 52c36a70a3d0..45061b584380 100644 --- a/kernel/sched/ext_idle.c +++ b/kernel/sched/ext_idle.c @@ -544,7 +544,7 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags, u64 * core. */ if (flags & SCX_PICK_IDLE_CORE) { - cpu = prev_cpu; + cpu = -EBUSY; goto out_unlock; } } |