Re: [LSF/MM/BPF TOPIC] Reimagining Memory Cgroup (memcg_ext)
From: Shakeel Butt
Date: Wed Mar 11 2026 - 13:00:33 EST
On Wed, Mar 11, 2026 at 12:57:34PM +0800, Jiayuan Chen wrote:
>
> On 3/8/26 2:24 AM, Shakeel Butt wrote:
[...]
> >
> > Per-Memcg Background Reclaim
> >
> > In the new memcg world, with the goal of (mostly) eliminating direct synchronous
> > reclaim for limit enforcement, provide per-memcg background reclaimers which can
> > scale across CPUs with the allocation rate.
>
> This sounds like a very useful approach. I have a few questions I'm thinking
> through:
>
> How would you approach implementing this background reclaim? I'm imagining
> something like asynchronous memory.reclaim operations - is that in line
> with your thinking?
Yes something similar. I still need to figure out the details of the mechanism
but it will be calling try_to_free_mem_cgroup_pages(). More specifically the
context need more thought because we need to account the CPU consumption of
those background reclaimers to corresponding cgroup. Will we be using BPF
workqueues or something else, need more investigation.
>
> And regarding cold page identification - do you have a preferred approach?
> I'm curious what the most practical way would be to accurately identify
> which pages to reclaim.
That's orthogonal and is the job of the reclaim mechanism which can traditional
LRU or MGLRU.
>