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>
This commit is contained in:
parent
1e32e77f95
commit
c67a8a685a
5 changed files with 24 additions and 31 deletions
|
|
@ -506,8 +506,8 @@ void memcg_update_array_size(int num_groups);
|
|||
struct kmem_cache *
|
||||
__memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp);
|
||||
|
||||
int memcg_charge_kmem(struct mem_cgroup *memcg, gfp_t gfp, u64 size);
|
||||
void memcg_uncharge_kmem(struct mem_cgroup *memcg, u64 size);
|
||||
int __memcg_charge_slab(struct kmem_cache *cachep, gfp_t gfp, int order);
|
||||
void __memcg_uncharge_slab(struct kmem_cache *cachep, int order);
|
||||
|
||||
int __kmem_cache_destroy_memcg_children(struct kmem_cache *s);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue