Commit 37477d9e authored by Andrea Righi's avatar Andrea Righi Committed by Tejun Heo
Browse files

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: c414c217 ("sched_ext: idle: Honor idle flags in the built-in idle selection policy")
Signed-off-by: default avatarAndrea Righi <arighi@nvidia.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent f6e0150b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}
	}