public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
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	[thread overview]
Message-ID: <review-overall-20260302-dmemcg-aggressive-protect-v5-0-ffd3a2602309@gmx.de> (raw)
In-Reply-To: <20260302-dmemcg-aggressive-protect-v5-0-ffd3a2602309@gmx.de>

Overall Series Review

Subject: cgroup/dmem,drm/ttm: Improve protection in contended cases
Author: Natalie Vock <natalie.vock@gmx.de>
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

  parent reply	other threads:[~2026-03-03  3:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 12:37 [PATCH v5 0/6] cgroup/dmem,drm/ttm: Improve protection in contended cases Natalie Vock
2026-03-02 12:37 ` [PATCH v5 1/6] cgroup/dmem: Add queries for protection values Natalie Vock
2026-03-03  3:29   ` Claude review: " Claude Code Review Bot
2026-03-02 12:37 ` [PATCH v5 2/6] cgroup,cgroup/dmem: Add (dmem_)cgroup_common_ancestor helper Natalie Vock
2026-03-02 14:38   ` Maarten Lankhorst
2026-03-03  3:29   ` Claude review: " Claude Code Review Bot
2026-03-02 12:37 ` [PATCH v5 3/6] drm/ttm: Extract code for attempting allocation in a place Natalie Vock
2026-03-02 15:08   ` Tvrtko Ursulin
2026-03-03  3:29   ` Claude review: " Claude Code Review Bot
2026-03-02 12:37 ` [PATCH v5 4/6] drm/ttm: Split cgroup charge and resource allocation Natalie Vock
2026-03-02 15:25   ` Tvrtko Ursulin
2026-03-03  3:29   ` Claude review: " Claude Code Review Bot
2026-03-02 12:37 ` [PATCH v5 5/6] drm/ttm: Be more aggressive when allocating below protection limit Natalie Vock
2026-03-02 17:02   ` Tvrtko Ursulin
2026-03-03  3:29   ` Claude review: " Claude Code Review Bot
2026-03-02 12:37 ` [PATCH v5 6/6] drm/ttm: Use common ancestor of evictor and evictee as limit pool Natalie Vock
2026-03-03  3:29   ` Claude review: " Claude Code Review Bot
2026-03-03  3:29 ` Claude Code Review Bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-13 11:39 [PATCH v6 0/6] cgroup/dmem,drm/ttm: Improve protection in contended cases Natalie Vock
2026-03-13 21:10 ` Claude review: " Claude Code Review Bot
2026-02-25 12:10 [PATCH v4 0/6] " Natalie Vock
2026-02-27  3:36 ` Claude review: " 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-20260302-dmemcg-aggressive-protect-v5-0-ffd3a2602309@gmx.de \
    --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