mm: memcontrol: use root_mem_cgroup res_counter
authorJohannes Weiner <[email protected]>
Wed, 6 Aug 2014 23:05:59 +0000 (16:05 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Aug 2014 01:01:17 +0000 (18:01 -0700)
commit05b8430123359886ef6a4146fba384e30d771b3f
tree6d83d5c64448f2cbb8fe1df84b7d423dd24f823a
parent692e7c45d95ad1064b6911800e2cfec7fc0236db
mm: memcontrol: use root_mem_cgroup res_counter

Due to an old optimization to keep expensive res_counter changes at a
minimum, the root_mem_cgroup res_counter is never charged; there is no
limit at that level anyway, and any statistics can be generated on
demand by summing up the counters of all other cgroups.

However, with per-cpu charge caches, res_counter operations do not even
show up in profiles anymore, so this optimization is no longer
necessary.

Remove it to simplify the code.

Signed-off-by: Johannes Weiner <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c