[PATCH 3/3] sched_ext: Remove the foreign CPU check from the kick_sync wait
From: Andrea Righi
Date: Tue Oct 20 2026 - 04:50:57 EST
The kick_sync balance callback is now queued from set_next_task_scx()
after the core-wide selection has finished. Proxy resolution zaps the
callbacks before dropping the rq lock, so a foreign CPU cannot acquire
the lock and flush this callback while it is queued.
Remove the unreachable foreign CPU check and its obsolete comment.
Suggested-by: Tejun Heo <tj@xxxxxxxxxx>
Link: https://lore.kernel.org/r/08cac02c604dd73ef96fc92eb29d692b@xxxxxxxxxx
Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
---
kernel/sched/ext/ext.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index 4b7d2602b4d40..a9b26fa431bf3 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -3733,15 +3733,6 @@ static void kick_sync_wait_bal_cb(struct rq *rq)
bool waited;
s32 cpu;
- /*
- * This callback is queued once the pick is final and flushed within
- * @rq's own scheduling pass. If a lock taker on a foreign CPU ever
- * flushes it, the snapshots are unrelated to that CPU. Don't get in the
- * way and leave the wait pending for @rq's next pick.
- */
- if (unlikely(cpu_of(rq) != smp_processor_id()))
- return;
-
/*
* Clear only when the wait actually runs. The callback can be dropped
* without running (e.g., proxy exec zaps the balance callbacks and
--
2.56.0