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/ttm: Fix GPU MM stats during pool shrinking
Date: Tue, 05 May 2026 08:58:24 +1000	[thread overview]
Message-ID: <review-overall-20260502065338.2720646-1-matthew.brost@intel.com> (raw)
In-Reply-To: <20260502065338.2720646-1-matthew.brost@intel.com>

Overall Series Review

Subject: drm/ttm: Fix GPU MM stats during pool shrinking
Author: Matthew Brost <matthew.brost@intel.com>
Patches: 3
Reviewed: 2026-05-05T08:58:24.455662

---

This is a single patch (v2) fixing a real bug in TTM's GPU memory accounting. When TTM pool backup/purge/restore frees pages via `__free_pages()` or `put_page()` directly, it bypasses the `NR_GPU_ACTIVE` / `NR_GPU_RECLAIM` stat updates that were established in commit ae80122f3896. This causes the GPU MM statistics reported via `/proc/meminfo` (or equivalent) to drift out of sync over time as pages are shrunk/backed up.

The fix is clean and well-scoped: a small helper function is introduced and applied to both the existing inline code in `ttm_pool_free_page()` (refactor) and the three buggy call sites. The approach is correct — all three fixed sites free pages that are in `NR_GPU_ACTIVE` state, and `reclaim=false` is the right choice for each.

**Verdict: Looks good.** One minor observation below, but nothing blocking.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-05-04 22:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-02  6:53 [PATCH v2] drm/ttm: Fix GPU MM stats during pool shrinking Matthew Brost
     [not found] ` <7f927ef8-2d3d-4609-926d-b18535794f72@panix.com>
2026-05-04  3:56   ` Dave Airlie
2026-05-04  4:09     ` Matthew Brost
2026-05-04 22:58 ` Claude review: " Claude Code Review Bot
2026-05-04 22:58 ` Claude Code Review Bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-01 22:30 [PATCH] " Matthew Brost
2026-05-04 23:02 ` Claude review: " Claude Code Review Bot
2026-05-04 23:02 ` 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-20260502065338.2720646-1-matthew.brost@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