diff options
| author | Tejun Heo <tj@kernel.org> | 2026-08-14 14:56:56 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-08-15 00:07:42 -1000 |
| commit | e0253dd04beb03e79477c5ef4768b11135687206 (patch) | |
| tree | 55359b3fef69df997cb975aa05d17efb730b07d2 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 524ab50763af33d65e6e042cf7034cd8f82d437b (diff) | |
sched_ext: Keep kick_sync waiting on the rq's own CPU
kick_sync_wait_bal_cb() assumes it runs on the rq's CPU from the
__schedule() tail: the snapshots it compares against live in that CPU's
percpu area and the busy-wait runs with the rq lock dropped and IRQs
enabled.
However, dispatch can now drop the rq lock while the callback sits queued,
and rq lock takers in that window (the sched class change paths, the scx
task iterator) flush pending balance callbacks on release, running the
callback on a foreign CPU. Such a run compares against unrelated snapshots
and can deadlock when the executing CPU is itself a wait target.
Bail on a foreign CPU and leave the wait state alone. The wait only observes
progress that the resched kicks already guarantee and the rq's next wait
picks up the stale cpus_to_sync bits.
Fixes: 4c95380701f5 ("sched/ext: Fold balance_scx() into pick_task_scx()")
Cc: stable@vger.kernel.org # v6.19+
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
