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: implement dmem.high soft limit via prioritized eviction Date: Thu, 04 Jun 2026 14:56:52 +1000 Message-ID: In-Reply-To: <20260531-feature-dmem-high-v6-1-20563ecd6dc7@gmail.com> References: <20260531-feature-dmem-high-v6-1-20563ecd6dc7@gmail.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: cgroup/dmem: implement dmem.high soft limit via prioritized eviction Author: Qiliang Yuan Patches: 2 Reviewed: 2026-06-04T14:56:52.172403 --- This is a single-patch series (v6) adding a `dmem.high` soft limit to the dmem cgroup v2 controller. The concept is sound: rather than only having a hard `max` limit that causes allocation failures, a `high` soft limit causes prioritized eviction of buffer objects belonging to over-limit cgroups. The implementation adds a 3-pass eviction strategy in TTM and a `try_high` parameter to `dmem_cgroup_state_evict_valuable()`. The patch has gone through 6 revisions, fixing real bugs (NULL dereferences, deadlock risks, stub behavior). The core design -- prioritized eviction via a first pass targeting over-high cgroups -- is a reasonable approach. However, there are several issues ranging from correctness concerns to minor nits. **Key concerns:** 1. The `try_high` pass respects `dmem.min` but ignores `dmem.low` -- this creates an inconsistency where the high-priority eviction pass is more aggressive than the standard pass with respect to low-watermark protection. 2. The parent-chain walk for the `try_high` check traverses `page_counter` parents, which correspond to cgroup hierarchy parents. This is correct but the walk has no bound and could be expensive in deeply nested hierarchies (minor concern). 3. The `limit_pool == test_pool` + `try_high` path does NOT check `dmem.min` protection, unlike the general `try_high` path -- this is asymmetric. --- --- Generated by Claude Code Patch Reviewer