mm: memcontrol: revert use of root_mem_cgroup res_counter
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 5 Sep 2014 12:43:57 +0000 (08:43 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Sep 2014 15:19:02 +0000 (08:19 -0700)
commitce00a967377baadf2481521e131771adc7652856
treedf99fb2d2c1e2e0aa6873913decf53487e97391e
parent10096fb1088e5c89b10772a1dfbe9682ecae5cea
mm: memcontrol: revert use of root_mem_cgroup res_counter

Dave Hansen reports a massive scalability regression in an uncontained
page fault benchmark with more than 30 concurrent threads, which he
bisected down to 05b843012335 ("mm: memcontrol: use root_mem_cgroup
res_counter") and pin-pointed on res_counter spinlock contention.

That change relied on the per-cpu charge caches to mostly swallow the
res_counter costs, but it's apparent that the caches don't scale yet.

Revert memcg back to bypassing res_counters on the root level in order
to restore performance for uncontained workloads.

Reported-by: Dave Hansen <dave@sr71.net>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Dave Hansen <dave.hansen@intel.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c