Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched_ext: Fix scx_bpf_reenqueue_local() silently reenqueuing nothing

ffa7ae0724e4 ("sched_ext: Add reenq_flags plumbing to scx_bpf_dsq_reenq()")
introduced task_should_reenq() as a filter inside reenq_local(), requiring
SCX_REENQ_ANY to be set in order to match any task. scx_bpf_dsq_reenq()
handles this correctly by converting a bare reenq_flags=0 to SCX_REENQ_ANY,
but scx_bpf_reenqueue_local() was not updated and continued to call
reenq_local() with 0, causing it to silently reenqueue zero tasks.

Fix by passing SCX_REENQ_ANY directly.

Fixes: ffa7ae0724e4 ("sched_ext: Add reenq_flags plumbing to scx_bpf_dsq_reenq()")
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Cheng-Yang Chou and committed by
Tejun Heo
28c4ef2b ce897abc

+1 -1
+1 -1
kernel/sched/ext.c
··· 8121 8121 rq = cpu_rq(smp_processor_id()); 8122 8122 lockdep_assert_rq_held(rq); 8123 8123 8124 - return reenq_local(sch, rq, 0); 8124 + return reenq_local(sch, rq, SCX_REENQ_ANY); 8125 8125 } 8126 8126 8127 8127 __bpf_kfunc_end_defs();