linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/9] mm: memcg: put cgroup v1-specific memcg data under CONFIG_MEMCG_V1
@ 2024-06-28 21:03 Roman Gushchin
  2024-06-28 21:03 ` [PATCH v1 1/9] mm: memcg: move memcg_account_kmem() to memcontrol-v1.c Roman Gushchin
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Roman Gushchin @ 2024-06-28 21:03 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Johannes Weiner, Michal Hocko,
	Shakeel Butt, Muchun Song, Roman Gushchin

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(-)

-- 
2.45.2.803.g4e1b14247a-goog



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-07-05  3:43 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-28 21:03 [PATCH v1 0/9] mm: memcg: put cgroup v1-specific memcg data under CONFIG_MEMCG_V1 Roman Gushchin
2024-06-28 21:03 ` [PATCH v1 1/9] mm: memcg: move memcg_account_kmem() to memcontrol-v1.c Roman Gushchin
2024-06-29  0:30   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 2/9] mm: memcg: factor out legacy socket memory accounting code Roman Gushchin
2024-06-29  0:39   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 3/9] mm: memcg: guard cgroup v1-specific code in mem_cgroup_print_oom_meminfo() Roman Gushchin
2024-06-29  0:40   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 4/9] mm: memcg: gather memcg1-specific fields initialization in memcg1_memcg_init() Roman Gushchin
2024-06-29  0:43   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 5/9] mm: memcg: guard memcg1-specific fields accesses in mm/memcontrol.c Roman Gushchin
2024-06-29  0:49   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 6/9] mm: memcg: put memcg1-specific struct mem_cgroup's members under CONFIG_MEMCG_V1 Roman Gushchin
2024-06-29  0:48   ` Shakeel Butt
2024-07-04 23:35     ` Andrew Morton
2024-07-05  3:43       ` Shakeel Butt
2024-07-03 15:12   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 7/9] mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node Roman Gushchin
2024-06-29  0:52   ` Shakeel Butt
2024-07-03 15:13   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 8/9] mm: memcg: put struct task_struct::memcg_in_oom under CONFIG_MEMCG_V1 Roman Gushchin
2024-06-29  0:53   ` Shakeel Butt
2024-06-28 21:03 ` [PATCH v1 9/9] mm: memcg: put struct task_struct::in_user_fault " Roman Gushchin
2024-06-29  0:55   ` Shakeel Butt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox