Re: [PATCH RFC 1/2] mm/memcontrol: add page-level charge/uncharge functions
From: Eric Chanudet
Date: Tue Apr 07 2026 - 10:32:17 EST
On Fri, Apr 03, 2026 at 01:15:03PM -0400, Johannes Weiner wrote:
> On Fri, Apr 03, 2026 at 10:08:35AM -0400, Eric Chanudet wrote:
> > Expose functions to charge/uncharge memcg with a number of pages instead
> > of a folio.
> >
> > Signed-off-by: Eric Chanudet <echanude@xxxxxxxxxx>
>
> No naked number accounting, please. The reason existing charge paths
> require you to pass an object is because there are other memory
> attributes we need to track (such as NUMA node location).
>
Understood, thank you.
I'll change to using a mem_cgroup_dmem_{,un}charge functions and a
memory.stat entry as well, similar to what is done for
mem_cgroup_sk_{,un}charge.
--
Eric Chanudet