diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2014-06-04 19:07:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:01 -0400 |
commit | c67a8a685a6e9abbaf0235e084168f15a721ae39 (patch) | |
tree | 946c9890d1638aa5540b596beefc305ad5dc26d0 /include/linux/memcontrol.h | |
parent | 1e32e77f95d60b121b6072e3e3a650a7f93068f9 (diff) |
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>
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 087a45314181..d38d190f4cec 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -506,8 +506,8 @@ void memcg_update_array_size(int num_groups); | |||
506 | struct kmem_cache * | 506 | struct kmem_cache * |
507 | __memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp); | 507 | __memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp); |
508 | 508 | ||
509 | int memcg_charge_kmem(struct mem_cgroup *memcg, gfp_t gfp, u64 size); | 509 | int __memcg_charge_slab(struct kmem_cache *cachep, gfp_t gfp, int order); |
510 | void memcg_uncharge_kmem(struct mem_cgroup *memcg, u64 size); | 510 | void __memcg_uncharge_slab(struct kmem_cache *cachep, int order); |
511 | 511 | ||
512 | int __kmem_cache_destroy_memcg_children(struct kmem_cache *s); | 512 | int __kmem_cache_destroy_memcg_children(struct kmem_cache *s); |
513 | 513 | ||