Re: [RFC PATCH v2 0/3] disable optimistic spinning for ftrace_lock

From
Peter Zijlstra <peterz@infradead.org>
Date
2026-03-11 11:54:39
Also in
lkml
Reply to
Yafang Shao, 2026-03-11
On Wed, Mar 11, 2026 at 07:52:47PM +0800, Yafang Shao wrote:
Recently, we resolved a latency spike issue caused by concurrently running
bpftrace processes. The root cause was high contention on the ftrace_lock
due to optimistic spinning. We can optimize this by disabling optimistic
spinning for ftrace_lock.

While semaphores may present similar challenges, I'm not currently aware of
specific instances that exhibit this exact issue. Should we encounter
problematic semaphores in production workloads, we can address them at that
time.

PATCH #1: introduce slow_mutex_[un]lock to disable optimistic spinning
PATCH #2: add variant for rtmutex
PATCH #3: disable optimistic spinning for ftrace_lock
So I really utterly hate this.
Thread (13 messages) 13 messages, 5 authors, last reply 2026-03-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help