Skip to content

memcg/kmem: cleanup naming and callflows

Vladimir Davydov linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 1 replyIn review
  2. v16 patches 1 replySuperseded

Changes in v2 from the cover letter

- move memcg_params allocation/free for per memcg caches to slab_common.c, because this way it looks clearer (patch 4)
- minor changes in function names and comments

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6memcg: get rid of memcg_create_cache_nameinclude/linux/memcontrol.h include/linux/slab.h mm/memcontrol.c +1 more+10 -290 replies
2/6memcg: allocate memcg_caches array on first per memcg cache creationinclude/linux/slab.h mm/memcontrol.c mm/slab_common.c+72 -210 replies
3/6memcg: cleanup memcg_caches arrays relocation pathinclude/linux/memcontrol.h include/linux/slab.h mm/memcontrol.c +1 more+61 -1060 replies
4/6memcg: get rid of memcg_{alloc,free}_cache_paramsinclude/linux/memcontrol.h include/linux/slab.h mm/memcontrol.c +1 more+55 -600 replies
5/6memcg: cleanup kmem cache creation/destruction functions naminginclude/linux/memcontrol.h include/linux/slab.h mm/memcontrol.c +1 more+69 -580 replies
6/6memcg: cleanup kmem_id-related naminginclude/linux/memcontrol.h mm/memcontrol.c mm/slab.c +3 more+93 -910 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH -mm v2 0/6] memcg/kmem: cleanup naming and callflows

Hi,

In reply to "[PATCH RFC -mm v2 3/3] memcg, slab: simplify

Quoted 2 lines · synchronization scheme" Johannes

I like this patch, but the API names are confusing. Could we fix up that whole thing by any chance?

(see https://lkml.org/lkml/2014/4/18/317)

So this patch set is about cleaning up memcg/kmem naming.

While preparing it I found that some of the ugly-named functions constituting interface between memcontrol.c and slab_common.c can be neatly got rid of w/o complicating the code. Quite the contrary, w/o them call-flows look much simpler, IMO. So the first four patches do not rename anything actually - they just rework call-flows in kmem cache creation/destruction and memcg_caches arrays relocations paths. Finally, patches 5 and 6 clean up the naming.

v1: http://lkml.org/lkml/2014/4/25/254

Changes in v2:
- move memcg_params allocation/free for per memcg caches to slab_common.c, because this way it looks clearer (patch 4)
- minor changes in function names and comments

Reviews are appreciated.

Thanks,

Vladimir Davydov (6):
memcg: get rid of memcg_create_cache_name
memcg: allocate memcg_caches array on first per memcg cache creation
memcg: cleanup memcg_caches arrays relocation path
memcg: get rid of memcg_{alloc,free}_cache_params
memcg: cleanup kmem cache creation/destruction functions naming
memcg: cleanup kmem_id-related naming

 include/linux/memcontrol.h |   40 +----
 include/linux/slab.h       |   11 +-
 mm/memcontrol.c            |  396 +++++++++++++++++++-------------------------
 mm/slab.c                  |    4 +-
 mm/slab.h                  |   24 ++-
 mm/slab_common.c           |  148 ++++++++++++-----
 mm/slub.c                  |   10 +-
 7 files changed, 314 insertions(+), 319 deletions(-)
Signature · 1 line
1.7.10.4