diff options
author | Vladimir Davydov | 2014-10-10 00:28:45 +0200 |
---|---|---|
committer | Linus Torvalds | 2014-10-10 04:25:59 +0200 |
commit | f3bb3043a092368a255bca5d1c6f4352c96a3b2d (patch) | |
tree | 94509d92d4c0feb55db1548834e417ac43ebc81e /mm/slab_common.c | |
parent | memcg: move memcg_{alloc,free}_cache_params to slab_common.c (diff) | |
download | kernel-qcow2-linux-f3bb3043a092368a255bca5d1c6f4352c96a3b2d.tar.gz kernel-qcow2-linux-f3bb3043a092368a255bca5d1c6f4352c96a3b2d.tar.xz kernel-qcow2-linux-f3bb3043a092368a255bca5d1c6f4352c96a3b2d.zip |
memcg: don't call memcg_update_all_caches if new cache id fits
memcg_update_all_caches grows arrays of per-memcg caches, so we only need
to call it when memcg_limited_groups_array_size is increased. However,
currently we invoke it each time a new kmem-active memory cgroup is
created. Then it just iterates over all slab_caches and does nothing
(memcg_update_cache_size returns immediately).
This patch fixes this insanity. In the meantime it moves the code dealing
with id allocations to separate functions, memcg_alloc_cache_id and
memcg_free_cache_id.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Glauber Costa <glommer@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: David Rientjes <rientjes@google.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 'mm/slab_common.c')
0 files changed, 0 insertions, 0 deletions