memcg, slab: merge memcg_{bind,release}_pages to memcg_{un}charge_slab
authorVladimir Davydov <vdavydov@parallels.com>
Wed, 4 Jun 2014 23:07:39 +0000 (16:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:01 +0000 (16:54 -0700)
commitc67a8a685a6e9abbaf0235e084168f15a721ae39
tree946c9890d1638aa5540b596beefc305ad5dc26d0
parent1e32e77f95d60b121b6072e3e3a650a7f93068f9
memcg, slab: merge memcg_{bind,release}_pages to memcg_{un}charge_slab

Currently we have two pairs of kmemcg-related functions that are called on
slab alloc/free.  The first is memcg_{bind,release}_pages that count the
total number of pages allocated on a kmem cache.  The second is
memcg_{un}charge_slab that {un}charge slab pages to kmemcg resource
counter.  Let's just merge them to keep the code clean.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Glauber Costa <glommer@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
mm/slab.c
mm/slab.h
mm/slub.c