summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@linux.dev>2026-09-24 13:27:11 -0700
committerTejun Heo <tj@kernel.org>2026-09-24 11:09:35 -1000
commit7a919c7f86de8a0bbfd5da4eacdb67833dfe3e5a (patch)
treed22de64b9038ed19b97edad6285a21f752c1f5c1 /tools/perf/scripts/python/stackcollapse.py
parenta87743bd9e9bef4b69d6fcce992cdaaa8edb78e3 (diff)
downloadlinux-next-7a919c7f86de8a0bbfd5da4eacdb67833dfe3e5a.tar.gz
linux-next-7a919c7f86de8a0bbfd5da4eacdb67833dfe3e5a.zip
sched_ext: Test scx_has_subs() inline before calling sub-sched hooks
scx_reenq_reject(), scx_process_sync_ecaps() and scx_resolve_local_dsq() return early if there are no sub-schedulers, but clang emits the full prologue before the static branch. Without sub-schedulers, we still pay for a call and for saving and restoring up to six registers, on every wakeup, dispatch and local DSQ insert. Let's move the scx_has_subs() test into inline wrappers, so that these calls go away completely. The wrappers keep lockdep_assert_rq_held(). In a pinned perf bench sched pipe test on x86-64 with clang 22, this reduced kernel instructions by 52-54 per context switch with scx_simple, scx_lavd and scx_layered. No functional change intended. Signed-off-by: Usama Arif <usama.arif@linux.dev> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions