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 15:03:19 +1000 [thread overview]
Message-ID: <review-overall-20260531-feature-dmem-high-v5-1-1c6c532b26a9@gmail.com> (raw)
In-Reply-To: <20260531-feature-dmem-high-v5-1-1c6c532b26a9@gmail.com>
Overall Series Review
Subject: cgroup/dmem: implement dmem.high soft limit via prioritized eviction
Author: Qiliang Yuan <realwujing@gmail.com>
Patches: 1
Reviewed: 2026-06-04T15:03:19.411766
---
This is a single-patch v5 series adding a `dmem.high` soft limit to the dmem cgroup v2 controller. The concept is sound: when a hard `max` limit is hit and eviction is triggered, BOs from cgroups exceeding their `dmem.high` are targeted first via a new "Pass 1" in `ttm_bo_evict_alloc()`. This provides a useful middle ground between no limit and hard failure.
The patch has gone through significant iteration (v1→v5) addressing NULL-pointer issues, deadlock risks, and control flow problems. The v5 changes are clearly motivated by real bugs found in v4. However, several issues remain:
**Key concerns:**
1. **Missing `elow` check in the `try_high` path** — The try_high block respects `emin` but silently ignores `elow`, meaning BOs protected by `dmem.low` can be evicted during the high-priority pass.
2. **No documentation** — The patch adds a new cgroupfs control file but provides no documentation update (e.g., `Documentation/admin-guide/cgroup-v2.rst` or similar).
3. **The `try_high` path for `limit_pool == test_pool` skips `emin` protection** — When a cgroup hits its own limit and the same pool is being tested, the code only checks `used > high` but does not check against `emin`, unlike the cross-cgroup path.
4. **The 3-pass strategy has a subtle interaction** — Pass 1 uses blocking locks when a ticket is available, but Pass 2 always uses trylock. If Pass 1 fails to evict anything (all over-high BOs were locked and no ticket), and Pass 2 also fails to evict, the code falls through to Pass 3 which is the existing properly-locked path. This seems correct but could benefit from a comment about the fallback chain.
**Minor issues:**
- The cover letter text in the commit message body is duplicative with the commit message itself.
- Typo in the v2 changelog: "above-elow" (line 199).
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 5:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 8:45 [PATCH v5] cgroup/dmem: implement dmem.high soft limit via prioritized eviction Qiliang Yuan
2026-06-04 5:03 ` Claude review: " Claude Code Review Bot
2026-06-04 5:03 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-31 9:52 [PATCH v6] " Qiliang Yuan
2026-06-04 4:56 ` Claude review: " Claude Code Review Bot
2026-06-04 4:56 ` 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-v5-1-1c6c532b26a9@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