All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH sched_ext/for-7.2] selftests/sched_ext: Fix dsq_move_to_local check
@ 2026-06-01 15:53 Cheng-Yang Chou
  2026-06-01 17:30 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Cheng-Yang Chou @ 2026-06-01 15:53 UTC (permalink / raw)
  To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
  Cc: Ching-Chun Huang, Chia-Ping Tsai, yphbchou0911

scan_dsq_pool() checked == 0 against scx_bpf_dsq_move_to_local(),
which returns true on success. This inverted success and failure,
causing peek_dsq_dispatch() to double-dispatch on success and skip
the real_dsq fallback on failure.

Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
 tools/testing/selftests/sched_ext/peek_dsq.bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/sched_ext/peek_dsq.bpf.c b/tools/testing/selftests/sched_ext/peek_dsq.bpf.c
index 7f23fb17b1e0..9e802b52b29e 100644
--- a/tools/testing/selftests/sched_ext/peek_dsq.bpf.c
+++ b/tools/testing/selftests/sched_ext/peek_dsq.bpf.c
@@ -95,7 +95,7 @@ static int scan_dsq_pool(void)
 			record_peek_result(task->pid);
 
 			/* Try to move this task to local */
-			if (!moved && scx_bpf_dsq_move_to_local(dsq_id, 0) == 0) {
+			if (!moved && scx_bpf_dsq_move_to_local(dsq_id, 0)) {
 				moved = 1;
 				break;
 			}
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH sched_ext/for-7.2] selftests/sched_ext: Fix dsq_move_to_local check
  2026-06-01 15:53 [PATCH sched_ext/for-7.2] selftests/sched_ext: Fix dsq_move_to_local check Cheng-Yang Chou
@ 2026-06-01 17:30 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2026-06-01 17:30 UTC (permalink / raw)
  To: Cheng-Yang Chou
  Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min,
	Ching-Chun Huang, Chia-Ping Tsai

Hello,

On Mon, Jun 01, 2026 at 11:53:48PM +0800, Cheng-Yang Chou wrote:
> scan_dsq_pool() checked == 0 against scx_bpf_dsq_move_to_local(),
> which returns true on success. This inverted success and failure,
> causing peek_dsq_dispatch() to double-dispatch on success and skip
> the real_dsq fallback on failure.

Applied to sched_ext/for-7.2.

Thanks.

--
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-01 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 15:53 [PATCH sched_ext/for-7.2] selftests/sched_ext: Fix dsq_move_to_local check Cheng-Yang Chou
2026-06-01 17:30 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.