diff options
| author | Usama Arif <usama.arif@linux.dev> | 2026-09-23 07:07:50 -0700 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-09-23 08:53:31 -1000 |
| commit | efa7bc7d719558483b14e1c44bcce11532a44581 (patch) | |
| tree | 7d1a8680f99e8d66d549dd234250b03150159cf8 /tools/perf/scripts/python/flamegraph.py | |
| parent | 6b8d2bc44fbb6d232382141ae70d4ecc28a9dc36 (diff) | |
sched_ext: Avoid relocking DSQ during remote consumption
A remote consume unlinks a task from a non-local DSQ before switching
to the task's rq. Leaving p->scx.dsq set makes the following
deactivate_task() reacquire the DSQ lock in scx_dispatch_dequeue() to
clear the transfer state.
Keep p->scx.dsq set while switching rq locks so that a racing dequeue
can find the DSQ and cancel the transfer. After acquiring the source rq
and confirming ownership, clear p->scx.dsq. The subsequent dequeue then
takes its !dsq path without reacquiring the DSQ lock.
Fleet profiles show that roughly 70% of the cycles attributed to
scx_dispatch_dequeue() are spent in queued_spin_lock_slowpath() while
taking dsq->lock.
Signed-off-by: Usama Arif <usama.arif@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
