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/amdgpu: Wire up dmem cgroup reclaim for VRAM manager Date: Sat, 16 May 2026 14:48:43 +1000 Message-ID: In-Reply-To: <20260511173008.36526-6-thomas.hellstrom@linux.intel.com> References: <20260511173008.36526-1-thomas.hellstrom@linux.intel.com> <20260511173008.36526-6-thomas.hellstrom@linux.intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Verdict: Good.** Two changes: 1. Routes cgroup registration through `ttm_resource_manager_set_dmem_region()`, using a local `cg` variable instead of directly assigning to `man->cg`. This prevents storing error pointers in `man->cg` (the v3 fix). 2. The NULL place guard in `amdgpu_ttm_bo_eviction_valuable()`: ```c - !(place->flags & TTM_PL_FLAG_CONTIGUOUS)) + !(place && (place->flags & TTM_PL_FLAG_CONTIGUOUS))) ``` When `place` is NULL (cgroup drain mode), this expression evaluates to `!(NULL)` which is `true`, so the KFD fence check can still return `false` (preventing eviction of same-process KFD BOs). This seems like the right behavior: in cgroup drain mode, KFD BOs that belong to the current process are still protected from eviction unless the placement requires contiguous memory (which can't be determined without a place). This is a conservative and safe choice. --- Generated by Claude Code Patch Reviewer