diff options
| author | Thomas Gleixner <tglx@kernel.org> | 2026-02-24 17:36:20 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-02-27 16:40:07 +0100 |
| commit | 2e27beeb66e43f3b84aef5a07e486a5d50695c06 (patch) | |
| tree | 73f132f851c9fc1be9d48feb56f7d1fa2a6ff453 /include/linux/timerqueue_types.h | |
| parent | 70802807398c65f5a49b2baec87e1f6c8db43de6 (diff) | |
timekeeping: Allow inlining clocksource::read()
On some architectures clocksource::read() boils down to a single
instruction, so the indirect function call is just a massive overhead
especially with speculative execution mitigations in effect.
Allow architectures to enable conditional inlining of that read to avoid
that by:
- providing a static branch to switch to the inlined variant
- disabling the branch before clocksource changes
- enabling the branch after a clocksource change, when the clocksource
indicates in a feature flag that it is the one which provides the
inlined variant
This is intentionally not a static call as that would only remove the
indirect call, but not the rest of the overhead.
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260224163429.675151545@kernel.org
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions
