From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: cgroup/dmem,drm/ttm: Improve protection in contended cases Date: Tue, 03 Mar 2026 13:29:37 +1000 Message-ID: In-Reply-To: <20260302-dmemcg-aggressive-protect-v5-0-ffd3a2602309@gmx.de> References: <20260302-dmemcg-aggressive-protect-v5-0-ffd3a2602309@gmx.de> 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: cgroup/dmem,drm/ttm: Improve protection in contended cases Author: Natalie Vock Patches: 11 Reviewed: 2026-03-03T13:29:37.916644 --- This is a well-motivated v5 series from Natalie Vock that improves dmem cgroup protection semantics in TTM. The core problem is clear: when VRAM fills up from unprotected applications, protected applications get forced into GTT because TTM backs off to other placements before attempting eviction. The series adds infrastructure to detect protection status and uses it to trigger eviction of unprotected buffers on behalf of protected allocations. The series is logically structured: patches 1-2 add cgroup infrastructure, patch 3 refactors TTM allocation into a helper, patch 4 decouples charge from allocation, patch 5 implements the aggressive eviction logic, and patch 6 refines protection calculation using common ancestors. **Key issues found:** 1. **Compile-breaking bug in patch 3**: `return;` in an `int`-returning function (fixed in patch 4, but breaks bisectability) 2. **Doc typo in patch 2**: `@b` parameter described as "First pool" instead of "Second pool" 3. **Reference counting concern in patch 2**: `find_cg_pool_unlocked()` / `dmem_cgroup_common_ancestor()` lifetime guarantees need verification Overall the design is sound. The comment in patch 5 explaining the protection model is excellent. Fix the compile error in patch 3 and the doc typo, and this should be in good shape. --- --- Generated by Claude Code Patch Reviewer