Skip to content

memcg: reparent kmem on css offline

Vladimir Davydov linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8memcg: add pointer from memcg_cache_params to owner cacheinclude/linux/slab.h mm/memcontrol.c+7 -200 replies
2/8memcg: keep all children of each root cache on a listinclude/linux/memcontrol.h include/linux/slab.h mm/memcontrol.c +3 more+82 -632 replies
3/8slab: guarantee unique kmem cache naminginclude/linux/slab.h mm/slab_common.c+32 -60 replies
4/8slub: remove kmemcg id from create_unique_idmm/slub.c+0 -60 replies
5/8memcg: rework non-slab kmem pages charge pathinclude/linux/memcontrol.h include/linux/mm_types.h mm/memcontrol.c +1 more+57 -1200 replies
6/8memcg: introduce kmem contextinclude/linux/memcontrol.h include/linux/mm_types.h include/linux/slab.h +2 more+113 -910 replies
7/8memcg: move some kmem definitions uppermm/memcontrol.c+56 -580 replies
8/8memcg: reparent kmem context on memcg offlinemm/memcontrol.c+96 -650 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH -mm 0/8] memcg: reparent kmem on css offline

Hi,

This patch set introduces re-parenting of kmem charges on memcg css offline. The idea lying behind it is very simple - instead of pointing from kmem objects (kmem caches, non-slab kmem pages) directly to the memcg which they are charged against, we make them point to a proxy object, mem_cgroup_kmem_context, which, in turn, points to the memcg which it belongs to. As a result on memcg offline, it's enough to only re-parent the memcg's mem_cgroup_kmem_context.

Note, reparented kmem contexts will hang around until there is at least one object accounted to them, but since they are small (especially comparing to struct mem_cgroup), it's no big deal.

Reviews are appreciated.

Thanks,

Vladimir Davydov (8):
memcg: add pointer from memcg_cache_params to owner cache
memcg: keep all children of each root cache on a list
slab: guarantee unique kmem cache naming
slub: remove kmemcg id from create_unique_id
memcg: rework non-slab kmem pages charge path
memcg: introduce kmem context
memcg: move some kmem definitions upper
memcg: reparent kmem context on memcg offline

 include/linux/memcontrol.h |   88 ++++-----
 include/linux/mm_types.h   |    6 +
 include/linux/slab.h       |   17 +-
 mm/memcontrol.c            |  468 +++++++++++++++++++++-----------------------
 mm/page_alloc.c            |   22 ++-
 mm/slab.c                  |   40 ++--
 mm/slab_common.c           |   64 ++++--
 mm/slub.c                  |   45 ++---
 8 files changed, 382 insertions(+), 368 deletions(-)
Signature · 7 lines
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>