diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2014-10-09 15:28:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:25:59 -0400 |
commit | f3bb3043a092368a255bca5d1c6f4352c96a3b2d (patch) | |
tree | 94509d92d4c0feb55db1548834e417ac43ebc81e /crypto/internal.h | |
parent | 33a690c45b202e4c6483bfd1d93ad8d0f51df2ca (diff) | |
download | blackbird-op-linux-f3bb3043a092368a255bca5d1c6f4352c96a3b2d.tar.gz blackbird-op-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 'crypto/internal.h')
0 files changed, 0 insertions, 0 deletions