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: allow double-charging dmem allocations to memcg
Date: Mon, 25 May 2026 22:42:50 +1000	[thread overview]
Message-ID: <review-overall-20260519-cgroup-dmem-memcg-double-charge-v2-0-db4d1407062b@redhat.com> (raw)
In-Reply-To: <20260519-cgroup-dmem-memcg-double-charge-v2-0-db4d1407062b@redhat.com>

Overall Series Review

Subject: cgroup/dmem: allow double-charging dmem allocations to memcg
Author: Eric Chanudet <echanude@redhat.com>
Patches: 8
Reviewed: 2026-05-25T22:42:50.439377

---

This is a v2 2-patch series by Eric Chanudet that adds optional "double-charging" of dmem (device memory) cgroup allocations to the memory controller (memcg). The motivation is to let administrators account device memory allocations against both the dmem controller and the standard memory controller simultaneously.

**Architecture:** Patch 1 adds `mem_cgroup_dmem_charge()`/`mem_cgroup_dmem_uncharge()` helpers in mm/memcontrol.c. Patch 2 wires them into kernel/cgroup/dmem.c with a root-only `dmem.memcg` control file and a 4-state lock machine.

**Overall assessment:** The design is reasonable — the lock-on-first-charge approach prevents mid-life accounting inconsistencies, and keeping the control at root-only is appropriate. However, there are several correctness issues around charging/uncharging symmetry, the stat output units, error-path behavior in the write handler, and a potential silent failure mode in the charge path that need attention.

---

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-05-25 12:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 15:59 [PATCH v2 0/2] cgroup/dmem: allow double-charging dmem allocations to memcg Eric Chanudet
2026-05-19 15:59 ` [PATCH v2 1/2] mm/memcontrol: add dmem charge/uncharge functions Eric Chanudet
2026-05-20  7:22   ` Albert Esteve
2026-05-22 15:53   ` Shakeel Butt
2026-05-22 15:55     ` Shakeel Butt
2026-05-25 12:42   ` Claude review: " Claude Code Review Bot
2026-05-19 15:59 ` [PATCH v2 2/2] cgroup/dmem: add dmem.memcg control file for double-charging to memcg Eric Chanudet
2026-05-22 15:26   ` Michal Koutný
2026-05-22 16:17     ` Tejun Heo
2026-05-25 12:42   ` Claude review: " Claude Code Review Bot
2026-05-25 12:42 ` Claude Code Review Bot [this message]

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-20260519-cgroup-dmem-memcg-double-charge-v2-0-db4d1407062b@redhat.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