]> Git Repo - linux.git/commit
mm: memcg: charge memcg percpu memory to the parent cgroup
authorRoman Gushchin <[email protected]>
Wed, 12 Aug 2020 01:30:25 +0000 (18:30 -0700)
committerLinus Torvalds <[email protected]>
Wed, 12 Aug 2020 17:57:55 +0000 (10:57 -0700)
commit3e38e0aaca9eafb12b1c4b731d1c10975cbe7974
tree9df2be98d1908c91e92c1a968931d70ea8db0896
parent772616b031f06e05846488b01dab46a7c832da13
mm: memcg: charge memcg percpu memory to the parent cgroup

Memory cgroups are using large chunks of percpu memory to store vmstat
data.  Yet this memory is not accounted at all, so in the case when there
are many (dying) cgroups, it's not exactly clear where all the memory is.

Because the size of memory cgroup internal structures can dramatically
exceed the size of object or page which is pinning it in the memory, it's
not a good idea to simply ignore it.  It actually breaks the isolation
between cgroups.

Let's account the consumed percpu memory to the parent cgroup.

[[email protected]: add WARN_ON_ONCE()s, per Johannes]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Roman Gushchin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Acked-by: Dennis Zhou <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Tobin C. Harding <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Bixuan Cui <[email protected]>
Cc: Michal Koutný <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c
This page took 0.053263 seconds and 4 git commands to generate.