From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260502065338.2720646-1-matthew.brost@intel.com> References: <20260502065338.2720646-1-matthew.brost@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/ttm: Fix GPU MM stats during pool shrinking Author: Matthew Brost Patches: 3 Reviewed: 2026-05-05T08:58:24.455662 --- This is a single patch (v2) fixing a real bug in TTM's GPU memory accountin= g. When TTM pool backup/purge/restore frees pages via `__free_pages()` or `= put_page()` directly, it bypasses the `NR_GPU_ACTIVE` / `NR_GPU_RECLAIM` st= at updates that were established in commit ae80122f3896. This causes the GP= U MM statistics reported via `/proc/meminfo` (or equivalent) to drift out o= f 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()` (refact= or) and the three buggy call sites. The approach is correct =E2=80=94 all t= hree fixed sites free pages that are in `NR_GPU_ACTIVE` state, and `reclaim= =3Dfalse` is the right choice for each. **Verdict: Looks good.** One minor observation below, but nothing blocking. --- Generated by Claude Code Patch Reviewer