From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Add reclaim to the dmem cgroup controller Date: Sat, 16 May 2026 14:03:59 +1000 Message-ID: In-Reply-To: <20260512082406.44470-1-thomas.hellstrom@linux.intel.com> References: <20260512082406.44470-1-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 Overall Series Review Subject: Add reclaim to the dmem cgroup controller Author: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Patches: 6 Reviewed: 2026-05-16T14:03:59.614912 --- This is a well-structured v4 series that adds reclaim support to the dmem cgroup controller, enabling `dmem.max` writes below current usage to trigger TTM eviction rather than silently failing. The layering is clean: patch 1 is a standalone bug fix, patch 2 adds the core cgroup infrastructure, patch 3 provides the TTM eviction machinery, and patches 4-5 wire up xe and amdgpu respectively. The locking design (rwsem protecting reclaim callbacks against concurrent unregister) is sound, signal handling is proper, and the O_NONBLOCK support is a nice touch. The multi-pass eviction strategy in `ttm_bo_evict_cgroup()` correctly mirrors the existing `ttm_bo_evict_alloc()` approach. The series is generally in good shape for v4. One design consideration worth flagging: partial reclaim progress currently terminates the retry loop rather than retrying with a smaller target, which is conservative but may leave reclaimable memory on the table. This is discussed further in patch 2/3 below. --- Generated by Claude Code Patch Reviewer