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: allow double-charging dmem allocations to memcg Date: Mon, 25 May 2026 22:42:50 +1000 Message-ID: In-Reply-To: <20260519-cgroup-dmem-memcg-double-charge-v2-0-db4d1407062b@redhat.com> References: <20260519-cgroup-dmem-memcg-double-charge-v2-0-db4d1407062b@redhat.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: cgroup/dmem: allow double-charging dmem allocations to memcg Author: Eric Chanudet Patches: 8 Reviewed: 2026-05-25T22:42:50.439377 --- This is a v2 2-patch series by Eric Chanudet that adds optional "double-cha= rging" of dmem (device memory) cgroup allocations to the memory controller = (memcg). The motivation is to let administrators account device memory allo= cations 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/cgro= up/dmem.c with a root-only `dmem.memcg` control file and a 4-state lock mac= hine. **Overall assessment:** The design is reasonable =E2=80=94 the lock-on-firs= t-charge approach prevents mid-life accounting inconsistencies, and keeping= the control at root-only is appropriate. However, there are several correc= tness issues around charging/uncharging symmetry, the stat output units, er= ror-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