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:04:01 +1000 Message-ID: In-Reply-To: <20260512082406.44470-6-thomas.hellstrom@linux.intel.com> References: <20260512082406.44470-1-thomas.hellstrom@linux.intel.com> <20260512082406.44470-6-thomas.hellstrom@linux.intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Verdict: Good, with one observation on the NULL place guard.** **NULL place guard in `amdgpu_ttm_bo_eviction_valuable`:** ```c if (amdkfd_fence_check_mm(f, current->mm) && - !(place->flags & TTM_PL_FLAG_CONTIGUOUS)) + !(place && (place->flags & TTM_PL_FLAG_CONTIGUOUS))) return false; ``` When `place` is NULL (cgroup drain mode), `!(place && ...)` evaluates to `t= rue`, so the condition becomes `amdkfd_fence_check_mm(f, current->mm) && tr= ue` =E2=86=92 returns `false` (BO not evictable). This means KFD BOs belong= ing to `current->mm` are protected from cgroup reclaim. In practice this is likely fine: the cgroup `max` write is typically done b= y a cgroup management process (systemd, container runtime), not by the KFD = process itself, so `amdkfd_fence_check_mm(f, current->mm)` would be false a= nd the check would pass. The conservative behavior (protect KFD BOs from th= e writing process) is the safe choice here. **Cgroup registration wiring** mirrors patch 4 and uses the same `ttm_resou= rce_manager_set_dmem_region` helper. Clean. --- Generated by Claude Code Patch Reviewer