Skip to content

percpu: memcg memory accounting rework

Roman Gushchin linux-mm lkml 2 versions – Applied

Status from this message: I've applied this to for-5.14.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesApplied
  2. v11 patch 2 repliesSuperseded

Changes in v2 from the cover letter

- make all chunks memcg-aware instead of on-demand objcg allocation, by Dennis

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3mm, memcg: mark cgroup_memory_nosocket, nokmem and noswap as __ro_after_initmm/memcontrol.c+3 -30 replies
2/3mm, memcg: introduce mem_cgroup_kmem_disabled()include/linux/memcontrol.h mm/memcontrol.c+10 -00 replies
3/3percpu: rework memcg accountingmm/percpu-internal.h mm/percpu-km.c mm/percpu-stats.c +2 more+75 -1720 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/3] percpu: memcg memory accounting rework

This patchset reworks memcg-based accounting of the percpu memory:
instead of using two types of chunks (memcg-aware and non-memcg-aware) it treats all chunks as memcg-aware. An extra memory used for objcg arrays will is compensated by a better chunks utilization, so the total memory footprint should be the same or smaller.

First two patches are preparational changes and cleanups on the memcg side. The third one is percpu accounting rework.

v2:
- make all chunks memcg-aware instead of on-demand objcg allocation, by Dennis

v1:
https://lkml.org/lkml/2021/5/11/1343

Roman Gushchin (3):
mm, memcg: mark cgroup_memory_nosocket, nokmem and noswap as

    __ro_after_init

mm, memcg: introduce mem_cgroup_kmem_disabled()
percpu: rework memcg accounting

 include/linux/memcontrol.h |   5 ++
 mm/memcontrol.c            |  11 ++-
 mm/percpu-internal.h       |  52 +--------------
 mm/percpu-km.c             |   5 +-
 mm/percpu-stats.c          |  46 +++++--------
 mm/percpu-vm.c             |  11 ++-
 mm/percpu.c                | 133 +++++++++++++++----------------------
 7 files changed, 88 insertions(+), 175 deletions(-)
Signature · 1 line
2.31.1