HYHarry Yooinvmscan.org·Nov 22, 2025 · 4 min readMemory Cgroup: the initial kernel memory cgroup controller (v3.8)In this post, I try to describe the high-level idea without going into too much implementation detail. Note: I’ll briefly discuss the initial kernel memory cgroup controller. The Linux kernel has adopted a completely redesigned controller (called obj...00
HYHarry Yooinvmscan.org·Jun 15, 2025 · 11 min readMemory Cgroup: Charge Coalescing using Per-CPU Memcg Stock (v2.6.33)Intro By nature, memory cgroup charging can lead to significant lock contention on the spinlock of struct res_counter when processes in a memory cgroup run on multiple CPUs. This happens because the kernel maintains a struct res_counter for each memo...00
HYHarry Yooinvmscan.org·Jun 14, 2025 · 4 min readMemory Cgroup: Charge-Commit-Cancel scheme (v2.6.29)I realized that I didn't discuss the new charge-commit-cancel scheme introduced in v2.6.29. Let's briefly cover this scheme in this article. A few changes since v2.6.25 There are a few important changes since v2.6.25: The reference counting of page_...00
HYHarry Yooinvmscan.org·Jun 8, 2025 · 11 min readMemory Cgroup Naturalization in the Linux Kernel v3.3This article explains how the LRU scheme with the memory cgroup controller was changed in Linux kernel v3.3 (released in 2012). This update integrated the memory cgroup into the core MM rather than just “bolting into” the MM code, and it also reduced...00
HYHarry Yooinvmscan.org·May 3, 2025 · 17 min readA Brief Look At Memory Cgroup Controller Introduced In The Linux Kernel v2.6.25Introduction Caution: This article only covers memory cgroup in Linux kernel v2.6.25. Things may have been changed a lot now. Control group, often abbreviated as cgroup, is a Linux kernel feature that allows managing resources (CPU, memory, network/s...00