[PATCH 4/4] sched_ext: Drop the dead SCX_DEQ_CORE_SCHED_EXEC test in dequeue_task_scx()

From: Tejun Heo

Date: Sat Aug 15 2026 - 20:10:43 EST


dequeue_task_scx() masks SCX_DEQ_CORE_SCHED_EXEC out of the
SCX_DEQ_SCHED_CHANGE decision, but the test can never fire: the incoming
flags are an int of generic DEQUEUE_* bits while the flag is bit 32, and the
core-sched execute path never goes through class dequeue anyway -
set_next_task_scx() calls ops_dequeue() with the flag directly. The test was
live when the SCX_DEQ_SCHED_CHANGE computation sat in ops_dequeue() and
became dead when 03f5304aad0f ("sched_ext: Pass full dequeue flags to
ops.quiescent()") moved the computation here. Drop it.

Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
---
kernel/sched/ext/ext.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index f14e3fc69644..395d8f5aaaa8 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -2267,9 +2267,9 @@ static bool dequeue_task_scx(struct rq *rq, struct task_struct *p, int core_deq_

/*
* Set %SCX_DEQ_SCHED_CHANGE when the dequeue is due to a property
- * change (not sleep or core-sched pick).
+ * change (not sleep).
*/
- if (!(deq_flags & (DEQUEUE_SLEEP | SCX_DEQ_CORE_SCHED_EXEC)))
+ if (!(deq_flags & DEQUEUE_SLEEP))
deq_flags |= SCX_DEQ_SCHED_CHANGE;

if (!(p->scx.flags & SCX_TASK_QUEUED)) {
--
2.55.0