]> Git Repo - linux.git/commit - mm/slab_common.c
memcg: move memcg_update_cache_size() to slab_common.c
authorVladimir Davydov <[email protected]>
Thu, 9 Oct 2014 22:28:47 +0000 (15:28 -0700)
committerLinus Torvalds <[email protected]>
Fri, 10 Oct 2014 02:25:59 +0000 (22:25 -0400)
commit6f817f4cda68b09621312ec5ba84217bc5e37b3d
tree3c91b99f42ee347dfc4106f7c04786d0d46f0694
parentf3bb3043a092368a255bca5d1c6f4352c96a3b2d
memcg: move memcg_update_cache_size() to slab_common.c

`While growing per memcg caches arrays, we jump between memcontrol.c and
slab_common.c in a weird way:

  memcg_alloc_cache_id - memcontrol.c
    memcg_update_all_caches - slab_common.c
      memcg_update_cache_size - memcontrol.c

There's absolutely no reason why memcg_update_cache_size can't live on the
slab's side though.  So let's move it there and settle it comfortably amid
per-memcg cache allocation functions.

Besides, this patch cleans this function up a bit, removing all the
useless comments from it, and renames it to memcg_update_cache_params to
conform to memcg_alloc/free_cache_params, which we already have in
slab_common.c.

Signed-off-by: Vladimir Davydov <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Glauber Costa <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Pekka Enberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/memcontrol.h
mm/memcontrol.c
mm/slab_common.c
This page took 0.045949 seconds and 4 git commands to generate.