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: drm/v3d: Attach per-fd reset counters to v3d_stats
Date: Mon, 09 Mar 2026 08:56:09 +1000	[thread overview]
Message-ID: <review-patch5-20260306-v3d-reset-locking-improv-v3-5-49864fe00692@igalia.com> (raw)
In-Reply-To: <20260306-v3d-reset-locking-improv-v3-5-49864fe00692@igalia.com>

Patch Review

Moving the per-fd reset counter into `v3d_stats` is the natural follow-up. Since `v3d_stats` now outlives the fd (via job references), the reset can safely increment the counter through `job->client_stats->reset_counter` without needing the `file_priv` NULL check.

Using `atomic_t` for both global and per-fd reset counters is appropriate - they're incremented under `reset_lock` but read without it, so atomics provide the necessary visibility.

The `CONTEXT_RESET_COUNTER` ioctl now sums across all queues:

```c
	args->value = 0;
	for (enum v3d_queue q = 0; q < V3D_MAX_QUEUES; q++)
		args->value += atomic_read(&v3d_priv->stats[q]->reset_counter);
```

This is a slight semantic change from the old per-fd single counter: a single GPU reset previously incremented `v3d_priv->reset_counter` once, but now it increments only the specific queue's stats `reset_counter`. Since `v3d_gpu_reset_for_timeout` increments `job->client_stats->reset_counter` (one specific queue), and the ioctl sums all queues, the total should still reflect one increment per reset caused by this fd. This looks correct.

The big cleanup in `v3d_postclose` removing the `file_priv` NULL-ing dance is the main simplification goal of the series, and it's well-justified at this point.

No issues.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-08 22:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 11:30 [PATCH v3 0/6] drm/v3d: Improve v3d_stats lifetime and locking Maíra Canal
2026-03-06 11:30 ` [PATCH v3 1/6] drm/v3d: Handle error from drm_sched_entity_init() Maíra Canal
2026-03-08 22:56   ` Claude review: " Claude Code Review Bot
2026-03-06 11:30 ` [PATCH v3 2/6] drm/v3d: Use raw seqcount helpers instead of fighting with lockdep Maíra Canal
2026-03-08 22:56   ` Claude review: " Claude Code Review Bot
2026-03-06 11:30 ` [PATCH v3 3/6] drm/v3d: Refcount v3d_stats Maíra Canal
2026-03-08 22:56   ` Claude review: " Claude Code Review Bot
2026-03-06 11:30 ` [PATCH v3 4/6] drm/v3d: Hold v3d_stats references in each job Maíra Canal
2026-03-08 22:56   ` Claude review: " Claude Code Review Bot
2026-03-06 11:30 ` [PATCH v3 5/6] drm/v3d: Attach per-fd reset counters to v3d_stats Maíra Canal
2026-03-08 22:56   ` Claude Code Review Bot [this message]
2026-03-06 11:30 ` [PATCH v3 6/6] drm/v3d: Remove dedicated fence_lock Maíra Canal
2026-03-08 22:56   ` Claude review: " Claude Code Review Bot
2026-03-08 22:56 ` Claude review: drm/v3d: Improve v3d_stats lifetime and locking Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-05 23:25 [PATCH v2 0/6] " Maíra Canal
2026-03-05 23:25 ` [PATCH v2 5/6] drm/v3d: Attach per-fd reset counters to v3d_stats Maíra Canal
2026-03-08 23:20   ` Claude review: " 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-patch5-20260306-v3d-reset-locking-improv-v3-5-49864fe00692@igalia.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