From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-overall-20260531-feature-dmem-high-v6-1-20563ecd6dc7@gmail.com> (raw)
In-Reply-To: <20260531-feature-dmem-high-v6-1-20563ecd6dc7@gmail.com>
Overall Series Review
Subject: cgroup/dmem: implement dmem.high soft limit via prioritized eviction
Author: Qiliang Yuan <realwujing@gmail.com>
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
next prev parent reply other threads:[~2026-06-04 4:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 9:52 [PATCH v6] cgroup/dmem: implement dmem.high soft limit via prioritized eviction Qiliang Yuan
2026-05-31 17:06 ` Tejun Heo
2026-06-04 4:56 ` Claude Code Review Bot [this message]
2026-06-04 4:56 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-31 8:45 [PATCH v5] " Qiliang Yuan
2026-06-04 5:03 ` Claude review: " Claude Code Review Bot
2026-06-04 5:03 ` Claude Code Review Bot
2026-05-30 7:35 [PATCH v4] " Qiliang Yuan
2026-06-04 5:52 ` Claude review: " Claude Code Review Bot
2026-06-04 5:52 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-overall-20260531-feature-dmem-high-v6-1-20563ecd6dc7@gmail.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox