From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/ras: Introduce error threshold
Date: Fri, 05 Jun 2026 06:10:07 +1000 [thread overview]
Message-ID: <review-patch1-20260604184849.1011985-2-raag.jadav@intel.com> (raw)
In-Reply-To: <20260604184849.1011985-2-raag.jadav@intel.com>
Patch Review
This patch adds the core DRM RAS infrastructure for threshold queries. It follows the existing error counter pattern closely.
**Looks good:**
- The netlink policy tables, ops registrations, and `GENL_ADMIN_PERM` flags are all correct.
- Error handling with `genlmsg_cancel`/`nlmsg_free` on failure is done properly (addressed from v2 review).
- Documentation is clear and includes examples.
**Issues:**
1. **Missing locking around `xa_load` in threshold functions**: `get_node_error_threshold()` and `set_node_error_threshold()` call `xa_load()` on the shared xarray without any locking, same as the existing counter code. While this is consistent with the existing pattern, `set_error_threshold` is a write path — if concurrent set/get is expected, consider whether the driver callbacks need to be thread-safe (the docs should mention this responsibility). This is an existing issue inherited from the counter path, but worth documenting for the new threshold callbacks since set introduces a mutation operation that didn't exist with query-only.
2. **`query_error_threshold` callback signature asymmetry**: The `query_error_threshold` callback returns the `name` output parameter, but `set_error_threshold` does not take a name. This means `get_node_error_threshold` validates the error ID range AND asks the driver for the name, while `set_node_error_threshold` validates the range and just calls the driver. This is fine architecturally, but the name output from `query_error_threshold` exists only to populate the netlink reply — it would be cleaner to separate the "get name" concern from the "get threshold" concern, or document why they're coupled.
3. **`set-error-threshold` YAML spec has no reply section**:
```yaml
-
name: set-error-threshold
doc: >-
Set error threshold of a given counter.
attribute-set: error-counter-attrs
flags: [admin-perm]
do:
request:
attributes:
- node-id
- error-id
- error-threshold
```
There's no `reply:` block. This is fine if the intent is to return nothing on success (like `clear-error-counter`), but worth confirming that the generated code matches expectations.
4. **`get-error-threshold` spec missing `node-id` in reply**: The reply attributes are `error-id`, `error-name`, `error-threshold` — which matches `msg_reply_threshold()`. But it's inconsistent with `get-error-counter` which also doesn't include `node-id` in the reply, so this is consistent with the existing pattern.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 20:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 18:46 [PATCH v3 0/4] Introduce error threshold to drm_ras Raag Jadav
2026-06-04 18:46 ` [PATCH v3 1/4] drm/ras: Introduce error threshold Raag Jadav
2026-06-04 20:10 ` Claude Code Review Bot [this message]
2026-06-04 18:46 ` [PATCH v3 2/4] drm/xe/xe_ras: Add support for error counter Raag Jadav
2026-06-04 20:10 ` Claude review: " Claude Code Review Bot
2026-06-04 18:46 ` [PATCH v3 3/4] drm/xe/ras: Add support for error threshold Raag Jadav
2026-06-04 20:10 ` Claude review: " Claude Code Review Bot
2026-06-04 18:46 ` [PATCH v3 4/4] drm/xe/drm_ras: Wire up error threshold callbacks Raag Jadav
2026-06-04 20:10 ` Claude review: " Claude Code Review Bot
2026-06-04 20:10 ` Claude review: Introduce error threshold to drm_ras Claude Code Review Bot
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-patch1-20260604184849.1011985-2-raag.jadav@intel.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