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:48:42 +1000 Message-ID: In-Reply-To: <20260511173008.36526-1-thomas.hellstrom@linux.intel.com> References: <20260511173008.36526-1-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 Overall Series Review Subject: Add reclaim to the dmem cgroup controller Author: =3D?UTF-8?q?Thomas=3D20Hellstr=3DC3=3DB6m?=3D Patches: 6 Reviewed: 2026-05-16T14:48:42.283985 --- This is a well-structured v3 series from Thomas Hellstr=C3=B6m that adds sy= nchronous reclaim to the dmem cgroup controller, enabling `dmem.max` to be = lowered below current VRAM usage without silently failing. The approach is = sound: set the new limit immediately (to block concurrent allocations), the= n invoke a driver-provided reclaim callback to evict memory. The series dec= omposes cleanly into a bugfix (patch 1), the core cgroup infrastructure (pa= tch 2), the TTM integration layer (patch 3), and two driver wiring patches = (4-5). The synchronization design using `unregister_sem` (rwsem) to protect reclai= m callbacks against concurrent unregistration is well thought out and addre= sses the v2 feedback from Sashiko-bot. The bounded retry loop with signal h= andling mirrors `memory.max` semantics from the memory cgroup controller, w= hich is a sensible design choice. Key concerns: - The `sleeping_lock` locking mode in patch 3 deliberately forgoes WW deadl= ock detection. The commit message acknowledges this ("should sooner than la= ter be converted to full WW transactions"). This is acceptable for the admi= n-initiated cgroup write path, but should be tracked as future work. - The change from `page_counter_set_max()` to raw `xchg()` in patch 2 is a = deliberate semantic change that should perhaps be called out more explicitl= y in the commit message. Overall: **Looks good with minor comments below.** --- Generated by Claude Code Patch Reviewer