From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Documentation: drm: Add entry for removing spsc_queue to TODO list
Date: Thu, 04 Jun 2026 15:59:15 +1000 [thread overview]
Message-ID: <review-patch1-20260529215207.115513-2-phasta@kernel.org> (raw)
In-Reply-To: <20260529215207.115513-2-phasta@kernel.org>
Patch Review
**Factual error — `ACCESS_ONCE()` reference is wrong:**
The patch states:
```
+This queue utilizes:
+
+- preempt_disable()
+- atomic instructions
+- memory barriers
+- ACCESS_ONCE()
```
`ACCESS_ONCE()` was removed from the kernel years ago and replaced with `READ_ONCE()`/`WRITE_ONCE()`. The current `spsc_queue.h` uses `READ_ONCE()` and `WRITE_ONCE()` exclusively. This should be corrected to `READ_ONCE() / WRITE_ONCE()`.
**Minor: "has to take a lock in some situations" claim is misleading:**
The patch says:
```
+Moreover, drm_sched_entity_push_job(), the only user of spsc_queue_push(), has
+to take a lock in some situations anyways and calls to it are often serialized
+with a driver lock.
```
Looking at the current code, `drm_sched_entity_push_job()` itself does not take any lock internally. Rather, its documentation states that callers should hold a "common lock" externally to guarantee ordering with `drm_sched_job_arm()`. This is an important distinction — the function relies on external serialization, but doesn't itself take any lock "in some situations." The wording could be made more precise to say something like "calls to it are typically externally serialized by a driver lock" to better reflect reality.
**Level classification:**
The task is marked as "Beginner" level. This seems reasonable for the replacement itself, though verifying correctness with benchmarks (especially on amdgpu) may push it toward Intermediate. The existing TODO entry immediately above it (about locking in `drm_sched_rq`) is marked Intermediate for similar work, so there's a minor inconsistency, but this is a judgment call.
**Structural nit — contact formatting:**
The existing TODO entries in the file use a single-line `Contact:` format like:
```
Contact: Philipp Stanner <phasta@kernel.org>
```
This patch uses a multi-line list format:
```
+Contact:
+
+- Philipp Stanner <phasta@kernel.org>
+- Christian König <christian.koenig@amd.com>
```
The list format is actually fine since there are two contacts, but worth noting the slight style difference. No change needed.
**Summary:** The patch is a reasonable TODO addition. The main actionable item is correcting the `ACCESS_ONCE()` reference to `READ_ONCE() / WRITE_ONCE()`, and optionally clarifying the locking claim about `drm_sched_entity_push_job()`.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-06-04 5:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 21:52 [PATCH] Documentation: drm: Add entry for removing spsc_queue to TODO list Philipp Stanner
2026-06-01 8:30 ` Christian König
2026-06-03 11:14 ` Philipp Stanner
2026-06-04 5:59 ` Claude review: " Claude Code Review Bot
2026-06-04 5:59 ` 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-patch1-20260529215207.115513-2-phasta@kernel.org \
--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