summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-10-06 10:29:05 -1000
committerTejun Heo <tj@kernel.org>2026-10-06 10:29:05 -1000
commita546831dff38b624240a90a6ff6d2b43d9226d51 (patch)
tree1e55abd2ac29ab16642d9ab265f8d7f3bfbd19a2 /tools/perf/scripts/python/bin/stackcollapse-report
parent3521f92ddd5f1a397e6ed9a6727694ca85950fb3 (diff)
sched_ext: Clear a sub-scheduler's caps before ops.sub_detach()
A sub-scheduler can leave standing state behind on the cids delegated to it, cpuperf targets being the obvious case, and the kernel does not track who wrote it. Restoring it is the parent's job and ops.sub_detach() is the place for it. Today the parent can't rely on that: the dying sub-scheduler keeps every cap until it is marked dead after ops.exit(), so its ops.exit() or a late timer can write after the parent has cleaned up. Clear every cap of the sub-scheduler before ops.sub_detach(). The pshard caps go first as a pending sync recomputes ecaps from them, and ecaps are then zeroed directly. A grant racing the clear is refused under the child's pshard lock, so nothing hands the caps back. Fixes: 86094b95efcf ("sched_ext: Add per-shard cap delegation for sub-schedulers") 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