Skip to content

mm: memcg: put cgroup v1-specific memcg data under CONFIG_MEMCG_V1

Roman Gushchin linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 13 repliesIn review 8 of 9 applied

Patches in v1 8 of 9 applied

#Subject and filesSizeRepliesApplied
1/9mm: memcg: move memcg_account_kmem() to memcontrol-v1.cmm/memcontrol-v1.c mm/memcontrol-v1.h mm/memcontrol.c+24 -211 reply
2/9mm: memcg: factor out legacy socket memory accounting codeinclude/linux/memcontrol.h mm/memcontrol-v1.c mm/memcontrol-v1.h +1 more+40 -171 replyApplied
3/9mm: memcg: guard cgroup v1-specific code in mem_cgroup_print_oom_meminfo()mm/memcontrol.c+2 -01 replyApplied
4/9mm: memcg: gather memcg1-specific fields initialization in memcg1_memcg_init()mm/memcontrol-v1.c mm/memcontrol-v1.h mm/memcontrol.c+12 -51 replyApplied
5/9mm: memcg: guard memcg1-specific fields accesses in mm/memcontrol.cmm/memcontrol.c+7 -21 replyApplied
6/9mm: memcg: put memcg1-specific struct mem_cgroup's members under CONFIG_MEMCG_V1include/linux/memcontrol.h+53 -504 repliesApplied
7/9mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_nodeinclude/linux/memcontrol.h+2 -02 repliesApplied
8/9mm: memcg: put struct task_struct::memcg_in_oom under CONFIG_MEMCG_V1include/linux/sched.h+3 -11 replyApplied
9/9mm: memcg: put struct task_struct::in_user_fault under CONFIG_MEMCG_V1include/linux/memcontrol.h include/linux/sched.h+21 -211 replyApplied

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchShakeel Butt
1/9A-b
2/9A-b
3/9A-b
4/9A-b
5/9A-b
6/9A-b
7/9A-b
8/9A-b
9/9A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/9] mm: memcg: put cgroup v1-specific memcg data under CONFIG_MEMCG_V1

This patchset puts all cgroup v1's members of struct mem_cgroup, struct mem_cgroup_per_node and struct task_struct under the CONFIG_MEMCG_V1 config option. If cgroup v1 support is not required (and it's true for many cgroup users these days), it allows to save a bit of memory and compile out some code, some of which is on relatively hot paths. It also structures the code a bit better by grouping cgroup v1-specific stuff in one place.

Roman Gushchin (9):
mm: memcg: move memcg_account_kmem() to memcontrol-v1.c
mm: memcg: factor out legacy socket memory accounting code
mm: memcg: guard cgroup v1-specific code in
mem_cgroup_print_oom_meminfo()
mm: memcg: gather memcg1-specific fields initialization in

    memcg1_memcg_init()

mm: memcg: guard memcg1-specific fields accesses in mm/memcontrol.c
mm: memcg: put memcg1-specific struct mem_cgroup's members under
CONFIG_MEMCG_V1
mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node
mm: memcg: put struct task_struct::memcg_in_oom under CONFIG_MEMCG_V1
mm: memcg: put struct task_struct::in_user_fault under CONFIG_MEMCG_V1

 include/linux/memcontrol.h | 147 +++++++++++++++++++------------------
 include/linux/sched.h      |   6 +-
 mm/memcontrol-v1.c         |  38 ++++++++++
 mm/memcontrol-v1.h         |  20 +++++
 mm/memcontrol.c            |  70 +++++++-----------
 5 files changed, 164 insertions(+), 117 deletions(-)
Signature · 1 line
2.45.2.803.g4e1b14247a-goog