From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Dmitry Ilvokhin <d@ilvokhin.com>, Dennis Zhou <dennis@kernel.org>,
Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@gentwo.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH RFC 3/3] locking: Wire up contended_release tracepoint
Date: Thu, 5 Mar 2026 18:42:23 +0100 [thread overview]
Message-ID: <20260305174223.GA1442992@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20260305105924.7069eb23@gandalf.local.home>
On Thu, Mar 05, 2026 at 10:59:24AM -0500, Steven Rostedt wrote:
> On Wed, 4 Mar 2026 16:56:17 +0000
> Dmitry Ilvokhin <d@ilvokhin.com> wrote:
>
> > @@ -204,6 +206,8 @@ static inline void rwbase_write_unlock(struct rwbase_rt *rwb)
> > unsigned long flags;
> >
> > raw_spin_lock_irqsave(&rtm->wait_lock, flags);
> > + if (rt_mutex_has_waiters(rtm))
> > + trace_contended_release(rwb);
>
> Hmm, if statements should never be used just for tracepoints without a
> static branch. The above should be:
>
> if (trace_contended_release_enabled() && rt_mutex_has_waiters(rtm))
> trace_contended_release(rwb);
>
I still wish you would accept:
if (trace_foo_enabled() && foo)
__do_trace_foo();
The compilers can't optimize the static branches and thus you'll get it
twice for no reason.
I really wish they would just accept __pure, but alas.
next prev parent reply other threads:[~2026-03-05 17:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 16:56 [PATCH RFC 0/3] locking: contended_release tracepoint instrumentation Dmitry Ilvokhin
2026-03-04 16:56 ` [PATCH RFC 1/3] locking: Add contended_release tracepoint Dmitry Ilvokhin
2026-03-04 22:55 ` Masami Hiramatsu
2026-03-04 16:56 ` [PATCH RFC 2/3] locking/percpu-rwsem: Extract __percpu_up_read_slowpath() Dmitry Ilvokhin
2026-03-04 22:02 ` Peter Zijlstra
2026-03-05 15:47 ` Steven Rostedt
2026-03-05 16:05 ` Peter Zijlstra
2026-03-04 16:56 ` [PATCH RFC 3/3] locking: Wire up contended_release tracepoint Dmitry Ilvokhin
2026-03-05 15:59 ` Steven Rostedt
2026-03-05 17:42 ` Peter Zijlstra [this message]
2026-03-05 18:06 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260305174223.GA1442992@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=boqun@kernel.org \
--cc=cl@gentwo.org \
--cc=d@ilvokhin.com \
--cc=dennis@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox