Skip to content

Commit 37477d9

Browse files
arighihtejun
authored andcommitted
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: c414c21 ("sched_ext: idle: Honor idle flags in the built-in idle selection policy") Signed-off-by: Andrea Righi <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent f6e0150 commit 37477d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/ext_idle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags, u64
544544
* core.
545545
*/
546546
if (flags & SCX_PICK_IDLE_CORE) {
547-
cpu = prev_cpu;
547+
cpu = -EBUSY;
548548
goto out_unlock;
549549
}
550550
}

0 commit comments

Comments
 (0)