]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: memcontrol: use root_mem_cgroup res_counter
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 26 Jun 2014 00:42:37 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 26 Jun 2014 00:42:37 +0000 (10:42 +1000)
commit138870520aaa04ade8512520808de2befd5ae92d
treeb3debd7954852bf9781942b8d247b700f030ee2c
parente3929abdc6274a1ddce67b82cf252112bf9ad9fc
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 <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c