Re: [RFC PATCH 0/3] mm/lru_gen: add memory.lru_gen interface for cgroup v2
From: Shakeel Butt
Date: Wed Jan 21 2026 - 17:23:48 EST
On Wed, Jan 21, 2026 at 08:39:46PM +0800, Jiayuan Chen wrote:
> This patchset adds a memory.lru_gen interface to cgroup v2, allowing users
> to interact with MGLRU directly on a specific cgroup without needing to
> know the internal memcg_id.
Unfortunetely we don't want to expose reclaim implementation specific
interface to a cgroup.
>
> Motivation
> ==========
> Currently, the only way to perform aging or eviction on a specific memcg
> is through the debugfs interface (/sys/kernel/debug/lru_gen), which
> requires the memcg_id. However, there's no straightforward way to get the
> memcg_id for a given cgroup path. This makes it difficult for users to
> leverage MGLRU's proactive reclaim capabilities on specific cgroups.
>From the next kernel version, this memcg_id will be inode number of the
cgroup for this interface. So, a simple 'ls -id cgroup_path' would be
sufficient for your use-case.
The relevant series [1] is in mm-tree at the moment and if you want, you
can backport it to your kernels.
[1] https://lkml.kernel.org/r/20251225232116.294540-1-shakeel.butt@xxxxxxxxx