How does the kernel manage LRU lists and perform memory reclaim when memory cgroup feature is enabled? I wrote an article to answer that question.
Memory Cgroup Naturalization in the Linux Kernel v3.3
https://vmscan.org/memory-cgroup-naturalization-in-the-linux-kernel-v33In the early days, memory cgroup was “bolted onto” the memory management subsystem, using a double-LRU scheme: each page was linked to both global and per-memcg lists—leading to a moderate memory overhead and complicating reclaim logic.
Linux v3.3 changed that. Memory cgroups were fully integrated into the MM core, global LRU lists were removed on memcg-enabled systems, and global reclaim began walking memcg hierarchy and scanning the per-memcg LRU lists, scanning each group in proportion to its memory usage.
This reduced memory overhead and simplified the reclaim code. More details in the article!