RFC mm: memcg accounting of percpu memory
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | percpu: return number of released bytes from pcpu_free_area()mm/ | +10 | 0 replies | |
| 2/5 | mm: memcg/percpu: account percpu memory to memory cgroupsmm/ mm/ mm/ +2 more | +237 | 2 replies | |
| 3/5 | mm: memcg/percpu: per-memcg percpu memory statisticsDocumentation/ include/ mm/ +1 more | +25 | 0 replies | |
| 4/5 | mm: memcg: charge memcg percpu memory to the parent cgroupmm/ | +10 | 0 replies | |
| 5/5 | kselftests: cgroup: add perpcu memory accounting testtools/ | +59 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/5] mm: memcg accounting of percpu memory
This patchset adds percpu memory accounting to memory cgroups. It's based on the rework of the slab controller and reuses concepts and features introduced for the per-object slab accounting.
Percpu allocations by their nature are scattered over multiple pages, so they can't be tracked on the per-page basis. So the per-object tracking introduced by the new slab controller is reused.
The patchset implements charging of percpu allocations, adds memcg-level statistics, enables accounting for memcg internals perpcu allocations and provides some basic tests.
It's based on top of the current version of the new slab controller patchset. The following patches are actually required by this series:
mm: memcg: factor out memcg- and lruvec-level changes out of __mod_lruvec_state()
mm: memcg: prepare for byte-sized vmstat items
mm: memcg: convert vmstat slab counters to bytes
mm: slub: implement SLUB version of obj_to_index()
mm: memcontrol: decouple reference counting from page accounting
mm: memcg/slab: obj_cgroup API
The whole series can be found here:
https://github.com/rgushchin/linux/pull/new/percpu_acc.RFC
Roman Gushchin (5):
percpu: return number of released bytes from pcpu_free_area()
mm: memcg/percpu: account percpu memory to memory cgroups
mm: memcg/percpu: per-memcg percpu memory statistics
mm: memcg: charge memcg percpu memory to the parent cgroup
kselftests: cgroup: add perpcu memory accounting test
Documentation/admin-guide/cgroup-v2.rst | 4 + include/linux/memcontrol.h | 8 + mm/memcontrol.c | 18 +- mm/percpu-internal.h | 49 ++++- mm/percpu-km.c | 5 +- mm/percpu-stats.c | 36 ++-- mm/percpu-vm.c | 5 +- mm/percpu.c | 206 ++++++++++++++++++--- tools/testing/selftests/cgroup/test_kmem.c | 59 ++++++ 9 files changed, 341 insertions(+), 49 deletions(-)
Signature · 1 line
2.25.4