summaryrefslogtreecommitdiff
path: root/crypto/wp512.c
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2026-07-27 09:47:45 -0700
committerDmitry Ilvokhin <d@ilvokhin.com>2026-07-29 06:07:29 -0700
commitb65e9e77eb73462a2c122c8d53bad1e2d55f8122 (patch)
tree96bb44824befb27db380abe66eb5e4a1381ac55f /crypto/wp512.c
parent7feb6b7578860a23d3fdba5d2ad79cefc0ba79a3 (diff)
downloadlinux-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 'crypto/wp512.c')
0 files changed, 0 insertions, 0 deletions