]> www.infradead.org Git - users/jedix/linux-maple.git/commit
memcg: add hierarchical effective limits for v2
authorShakeel Butt <shakeel.butt@linux.dev>
Wed, 5 Feb 2025 22:20:29 +0000 (14:20 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 4 Mar 2025 05:49:43 +0000 (21:49 -0800)
commit0679d900c95fca7266c912df16a3ac3eb0f80da6
tree04b7edf331c08234d81e93949b583dc9e1b2b27b
parentd1d7e70923f0ec79ec94923f316857097d2a9aca
memcg: add hierarchical effective limits for v2

Memcg-v1 exposes hierarchical_[memory|memsw]_limit counters in its
memory.stat file which applications can use to get their effective limit
which is the minimum of limits of itself and all of its ancestors.  This
is pretty useful in environments where cgroup namespace is used and the
application does not have access to the full view of the cgroup hierarchy.
Let's expose effective limits for memcg v2 as well.

Link: https://lkml.kernel.org/r/20250205222029.2979048-1-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: Balbir Singh <balbirs@nvidia.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Tejun Heo <tj@kernel.org>
Cc: "T.J. Mercier" <tjmercier@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/cgroup-v2.rst
mm/memcontrol.c