diff options
| author | Dmitry Ilvokhin <d@ilvokhin.com> | 2026-07-27 09:47:45 -0700 |
|---|---|---|
| committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2026-07-29 06:07:29 -0700 |
| commit | b65e9e77eb73462a2c122c8d53bad1e2d55f8122 (patch) | |
| tree | 96bb44824befb27db380abe66eb5e4a1381ac55f /net/rds/ib_sysctl.c | |
| parent | 7feb6b7578860a23d3fdba5d2ad79cefc0ba79a3 (diff) | |
| download | linux-contended-release-qspinlock.tar.gz linux-contended-release-qspinlock.tar.bz2 linux-contended-release-qspinlock.zip | |
x86/paravirt: Trace contended_release on unlockcontended-release-qspinlock
On PARAVIRT_SPINLOCKS=y kernels queued_spin_unlock() is dispatched
through a static_call(), and those kernels are quite common. Gating
contended_release behind a static branch there would leave a NOP on the
unlock path even while the tracepoint is disabled. Since the
static_call() is already present, swap its target to a traced unlock
while the tracepoint is enabled instead. When it is disabled the target
is the plain unlock (an inline store on native), so the unlock path is
unchanged and the tracepoint is truly zero-cost.
Implement the arch_contended_release_trace_reg() and
arch_contended_release_trace_unreg() hooks to update the
queued_spin_unlock static_call() on the tracepoint's enable and disable
transitions. Provide two traced variants,
native_queued_spin_unlock_traced() and pv_queued_spin_unlock_traced(),
so each tail-calls its own base unlock directly rather than recursing
through the now-traced static_call().
Teach pv_is_native_spin_unlock() that the traced native variant still
counts as native.
Only PARAVIRT_SPINLOCKS=y is affected. PARAVIRT_SPINLOCKS=n keeps the
generic static-branch path.
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Diffstat (limited to 'net/rds/ib_sysctl.c')
0 files changed, 0 insertions, 0 deletions