linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] memcg: reduce memory consumption by memcg stats
@ 2024-04-23  5:18 Shakeel Butt
  2024-04-23  5:18 ` [PATCH 1/4] mm: rearrange node_stat_item to put memcg stats at start Shakeel Butt
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Shakeel Butt @ 2024-04-23  5:18 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Michal Hocko, Roman Gushchin,
	Muchun Song
  Cc: linux-mm, linux-kernel

Most of the memory overhead of a memcg object is due to memcg stats
maintained by the kernel. Since stats updates happen in performance
critical codepaths, the stats are maintained per-cpu and numa specific
stats are maintained per-node * per-cpu. This drastically increase the
overhead on large machines i.e. large of CPUs and multiple numa nodes.
This patch series tries to reduce the overhead by at least not
allocating the memory for stats which are not memcg specific.

Shakeel Butt (4):
  mm: rearrange node_stat_item to put memcg stats at start
  memcg: reduce memory for the lruvec and memcg stats
  memcg: use proper type for mod_memcg_state
  memcg: restrict __mod_memcg_lruvec_state to memcg stats

 include/linux/memcontrol.h | 25 +++++++++++++------------
 include/linux/mmzone.h     | 29 +++++++++++++++++------------
 mm/memcontrol.c            | 12 +++++++-----
 mm/vmstat.c                | 24 ++++++++++++------------
 4 files changed, 49 insertions(+), 41 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2024-04-25 22:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23  5:18 [PATCH 0/4] memcg: reduce memory consumption by memcg stats Shakeel Butt
2024-04-23  5:18 ` [PATCH 1/4] mm: rearrange node_stat_item to put memcg stats at start Shakeel Butt
2024-04-23 13:58   ` Johannes Weiner
2024-04-23 17:44     ` Shakeel Butt
2024-04-23 18:30       ` Johannes Weiner
2024-04-25 22:54         ` Chris Li
2024-04-25 18:01   ` Chris Li
2024-04-23  5:18 ` [PATCH 2/4] memcg: reduce memory for the lruvec and memcg stats Shakeel Butt
2024-04-23 14:40   ` kernel test robot
2024-04-23 20:58   ` kernel test robot
2024-04-23  5:22 ` [PATCH 3/4] memcg: use proper type for mod_memcg_state Shakeel Butt
2024-04-23  5:23 ` [PATCH 4/4] memcg: restrict __mod_memcg_lruvec_state to memcg stats Shakeel Butt

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