From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Let userspace know about swapped out panthor GEM objects
Date: Thu, 23 Apr 2026 09:29:11 +1000 [thread overview]
Message-ID: <review-overall-20260420-panthor-bo-reclaim-observability-v1-0-a4d1a36ee84f@collabora.com> (raw)
In-Reply-To: <20260420-panthor-bo-reclaim-observability-v1-0-a4d1a36ee84f@collabora.com>
Overall Series Review
Subject: Let userspace know about swapped out panthor GEM objects
Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Patches: 6
Reviewed: 2026-04-23T09:29:11.567506
---
This is a clean, small, 2-patch series that adds "evicted" (swapped-out) memory tracking to the DRM fdinfo infrastructure and wires it up in the panthor driver. The motivation is sound: without this, userspace cannot distinguish between a BO that was never backed by pages and one that was backed but later evicted to swap. The implementation is straightforward and follows the established patterns for `RESIDENT`, `PURGEABLE`, and `ACTIVE` statuses.
**Key observations:**
1. The series depends on a not-yet-landed panthor GEM shrinker series (the patches reference `bo->backing.pages` while the current drm-next tree uses `bo->base.pages`, and `panthor_gem_evict_locked` doesn't exist yet). This is fine as a dependency chain, but should be noted.
2. The `atomic_t reclaimed_count` wrap-around-avoidance logic is clever but over-engineered for what is effectively a boolean "has ever been evicted" flag. The counter approach tries to serve dual duty — providing the count for potential future use while also acting as a boolean — and the wrap-around handling adds complexity for a scenario that is practically impossible (2^31 evictions of a single BO).
3. The fdinfo integration in patch 1 is clean and follows established patterns correctly. The `supported_status` bitmask mechanism means the "evicted" line only appears in fdinfo output when at least one object has actually been evicted, which is the right behavior.
**Overall: Series looks good. A few minor issues and design questions below.**
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-04-22 23:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 15:46 [PATCH 0/2] Let userspace know about swapped out panthor GEM objects Nicolas Frattaroli
2026-04-20 15:46 ` [PATCH 1/2] drm/fdinfo: Add "evicted" memory accounting Nicolas Frattaroli
2026-04-22 23:29 ` Claude review: " Claude Code Review Bot
2026-04-20 15:47 ` [PATCH 2/2] drm/panthor: Implement evicted status for GEM objects Nicolas Frattaroli
2026-04-20 16:17 ` Boris Brezillon
2026-04-20 17:46 ` Nicolas Frattaroli
2026-04-21 7:22 ` Boris Brezillon
2026-04-22 23:29 ` Claude review: " Claude Code Review Bot
2026-04-22 23:29 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-21 10:45 [PATCH v2 0/3] Let userspace know about swapped out panthor " Nicolas Frattaroli
2026-04-22 22:36 ` 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-overall-20260420-panthor-bo-reclaim-observability-v1-0-a4d1a36ee84f@collabora.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