diff options
| author | Usama Arif <usama.arif@linux.dev> | 2026-09-24 13:27:11 -0700 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-09-24 11:09:35 -1000 |
| commit | 7a919c7f86de8a0bbfd5da4eacdb67833dfe3e5a (patch) | |
| tree | d22de64b9038ed19b97edad6285a21f752c1f5c1 /tools/perf/python | |
| parent | a87743bd9e9bef4b69d6fcce992cdaaa8edb78e3 (diff) | |
| download | linux-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/python')
0 files changed, 0 insertions, 0 deletions
