Skip to contentSkip to conversation

sched_ext: fix flag check for deferred callbacks

PATCH Applied Emil Tsalapatis 2 participants 2 messages Oct 16, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched_ext: fix flag check for deferred callbacks

When scheduling the deferred balance callbacks, check SCX_RQ_BAL_CB_PENDING instead of SCX_RQ_BAL_PENDING. This way schedule_deferred() properly tests whether there is already a pending request for queue_balance_callback() to be invoked at the end of .balance().

Fixes a8ad873113d3 ("sched_ext: defer queue_balance_callback() until after ops.dispatch")
---
 kernel/sched/ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/ext.c +1 -1
index 12c9c3595692..ecb251e883ea 100644
@@ -792,7 +792,7 @@ static void schedule_deferred(struct rq *rq)
 		return;
 
 	/* Don't do anything if there already is a deferred operation. */
-	if (rq->scx.flags & SCX_RQ_BAL_PENDING)
+	if (rq->scx.flags & SCX_RQ_BAL_CB_PENDING)
 		return;
 
 	/*
Signature · 1 line
2.47.3
reviewer Applied
#1 lore raw
Quoted 7 lines · Emil Tsalapatis

When scheduling the deferred balance callbacks, check SCX_RQ_BAL_CB_PENDING instead of SCX_RQ_BAL_PENDING. This way schedule_deferred() properly tests whether there is already a pending request for queue_balance_callback() to be invoked at the end of .balance().

Fixes a8ad873113d3 ("sched_ext: defer queue_balance_callback() until after ops.dispatch")

Applied to sched_ext/for-6.18-fixes.

Thanks.

Signature · 1 line
tejun