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 09:02:45 +1000 Message-ID: In-Reply-To: <20260501223003.2648450-1-matthew.brost@intel.com> References: <20260501223003.2648450-1-matthew.brost@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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-05T09:02:45.099837 --- This is a single-patch fix for a GPU memory accounting bug in TTM pool management. The issue is real and the fix is correct: two call sites in `ttm_pool.c` were calling `__free_pages()` directly without decrementing `NR_GPU_ACTIVE`, causing GPU MM stats to drift upward over time as pages are freed through the backup/restore and purge paths. The approach of extracting a helper (`__free_pages_gpu_account()`) is clean and ensures consistency across all three `__free_pages` call sites in the file. The patch is minimal, well-scoped, and the Fixes tag correctly identifies the commit that introduced the GPU MM accounting. **Recommendation: Approve.** One minor question worth confirming below, but it shouldn't block the patch. --- --- Generated by Claude Code Patch Reviewer