* [PATCH] sched_ext: idle: Fix return code of scx_select_cpu_dfl()
@ 2025-03-26 19:18 Andrea Righi
2025-03-26 20:08 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Andrea Righi @ 2025-03-26 19:18 UTC (permalink / raw)
To: Tejun Heo, David Vernet, Changwoo Min; +Cc: Joel Fernandes, linux-kernel
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>
---
kernel/sched/ext_idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c
index 52c36a70a3d04..45061b5843806 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;
}
}
--
2.49.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] sched_ext: idle: Fix return code of scx_select_cpu_dfl()
2025-03-26 19:18 [PATCH] sched_ext: idle: Fix return code of scx_select_cpu_dfl() Andrea Righi
@ 2025-03-26 20:08 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2025-03-26 20:08 UTC (permalink / raw)
To: Andrea Righi; +Cc: David Vernet, Changwoo Min, Joel Fernandes, linux-kernel
On Wed, Mar 26, 2025 at 08:18:49PM +0100, Andrea Righi wrote:
> 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>
Applied to sched_ext/for-6.15-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-26 20:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-26 19:18 [PATCH] sched_ext: idle: Fix return code of scx_select_cpu_dfl() Andrea Righi
2025-03-26 20:08 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®