diff options
| author | Tejun Heo <tj@kernel.org> | 2026-07-23 15:07:56 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-07-25 10:33:17 -1000 |
| commit | ce228343010df67e0a35bd1a9980abcfdf9cf95f (patch) | |
| tree | 9496c3e8832cec4e1ded16475e5e0ac39946e4f1 /tools/perf/scripts/python/flamegraph.py | |
| parent | 7947442047cff1d296ab615b8c6ddbc7c9b7bf21 (diff) | |
sched_ext: Resolve most remaining scx_root accesses
scx_root is __rcu and naked accesses were left as transitional markers for
the multi-scheduler transition, to be converted to accesses through the
associated scheduler instances. Most accesses have since been converted to
resolve the sched from the program or task at hand. The remaining naked
sites divide into ones that semantically always want the root sched, which
this patch resolves, and one that is left to a later patch.
The resolved sites:
- The SCX_OPS_TID_TO_TASK validation and the ecaps sync kick already hold a
sched whose ancestors[] pins the root as entry 0 with plain pointers
stable for the sched's lifetime. Reach the root through the sched at hand.
- The dispatch entry, class switch, idle notification and fork init paths
only execute while the scheduler is live and scx_root never changes inside
the live window, so no update can race them. Add scx_root_protected_live()
which documents that invariant and resolves with a plain load.
- The hotplug path, including the ecaps reseeds, runs with the hotplug lock
held, which excludes the scx_root writers. Add scx_root_protected(), which
accepts either the hotplug lock or scx_enable_mutex.
- Is-root tests use a zero level instead of comparing against the global.
touch_core_sched_dispatch() stays naked, to be resolved by a later patch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
