public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH 00/15] tracepoint: Avoid double static_branch evaluation at guarded call sites
Date: Fri, 13 Mar 2026 14:04:52 +1000	[thread overview]
Message-ID: <review-overall-1e3c2830-765e-4271-89f7-0b6784b37597@efficios.com> (raw)
In-Reply-To: <1e3c2830-765e-4271-89f7-0b6784b37597@efficios.com>

Overall Series Review

Subject: Re: [PATCH 00/15] tracepoint: Avoid double static_branch evaluation at guarded call sites
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Patches: 18
Reviewed: 2026-03-13T14:04:52.638511

---

This is a well-motivated, clean optimization series. The core idea — avoiding a redundant `static_branch_unlikely()` evaluation at tracepoint call sites that are already guarded by `trace_foo_enabled()` — is sound and was suggested by both Steven Rostedt and Peter Zijlstra. The implementation is straightforward: a new `trace_invoke_##name()` API that calls `__do_trace_##name()` directly, bypassing the static branch, while preserving the LOCKDEP RCU-watching assertion and `might_fault()` for syscall tracepoints.

The filtered patches touching DRM/accel/dma-buf subsystems (patches 05, 08, 10) are all mechanical, correct conversions. The series is low-risk — it only changes behavior on hot paths when tracing is already enabled, and the functional semantics are preserved.

**One design concern** with patch 01 (the API patch): the new `trace_invoke_##name()` does **not** include the LOCKDEP `rcu_is_watching()` assertion that the normal `trace_##name()` path has. Looking at the implementation:

```c
static inline void trace_invoke_##name(proto)
{
    __do_trace_##name(args);
}
```

The normal `trace_##name()` includes:
```c
if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) {
    WARN_ONCE(!rcu_is_watching(),
              "RCU not watching for tracepoint");
}
```

The commit message for patch 01 says "retains the LOCKDEP RCU-watching assertion", but looking at the actual diff, **the assertion is NOT present** in `trace_invoke_##name()`. This is misleading. In practice it may be acceptable (the caller has already passed through `trace_foo_enabled()` which implies the tracepoint infrastructure is active, and `__do_trace_##name()` uses `guard(srcu_fast_notrace)` internally), but the commit message should accurately describe the behavior. Steven Rostedt should confirm whether omitting this assertion is intentional.

---

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-03-13  4:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 15:04 [PATCH 00/15] tracepoint: Avoid double static_branch evaluation at guarded call sites Vineeth Pillai (Google)
2026-03-12 15:04 ` [PATCH 01/15] tracepoint: Add trace_invoke_##name() API Vineeth Pillai (Google)
2026-03-12 15:12   ` Steven Rostedt
2026-03-12 15:39     ` Vineeth Remanan Pillai
2026-03-12 15:53       ` Peter Zijlstra
2026-03-12 16:05         ` Vineeth Remanan Pillai
2026-03-13  4:04     ` Claude review: " Claude Code Review Bot
2026-03-12 15:05 ` [PATCH 05/15] accel/habanalabs: Use trace_invoke_##name() at guarded tracepoint call sites Vineeth Pillai (Google)
2026-03-13  4:04   ` Claude review: " Claude Code Review Bot
2026-03-12 15:05 ` [PATCH 08/15] dma-buf: " Vineeth Pillai (Google)
2026-03-13  4:04   ` Claude review: " Claude Code Review Bot
2026-03-12 15:05 ` [PATCH 10/15] drm: " Vineeth Pillai (Google)
2026-03-13  4:04   ` Claude review: " Claude Code Review Bot
2026-03-12 15:12 ` [PATCH 00/15] tracepoint: Avoid double static_branch evaluation at guarded " Mathieu Desnoyers
2026-03-12 15:23   ` Steven Rostedt
2026-03-12 15:28     ` Mathieu Desnoyers
2026-03-12 15:40       ` Steven Rostedt
2026-03-12 15:49         ` Mathieu Desnoyers
2026-03-12 15:54           ` Peter Zijlstra
2026-03-12 15:57             ` Mathieu Desnoyers
2026-03-12 16:08           ` Vineeth Remanan Pillai
     [not found]             ` <CAEf4BzbnfyhCqp0ne=2gRnVxp-mdGmuZwDeFRyhRYH+eDcz2-w@mail.gmail.com>
2026-03-12 17:02               ` Steven Rostedt
2026-03-13  4:04   ` Claude Code Review Bot [this message]

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=review-overall-1e3c2830-765e-4271-89f7-0b6784b37597@efficios.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /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