linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/5] mm: memcg accounting of percpu memory
@ 2020-05-19 20:18 Roman Gushchin
  2020-05-19 20:18 ` [PATCH RFC 1/5] percpu: return number of released bytes from pcpu_free_area() Roman Gushchin
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Roman Gushchin @ 2020-05-19 20:18 UTC (permalink / raw)
  To: Andrew Morton, Dennis Zhou, Tejun Heo, Christoph Lameter
  Cc: Johannes Weiner, Michal Hocko, Shakeel Butt, linux-mm,
	kernel-team, linux-kernel, Roman Gushchin

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

-- 
2.25.4



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

end of thread, other threads:[~2020-05-27 21:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 20:18 [PATCH RFC 0/5] mm: memcg accounting of percpu memory Roman Gushchin
2020-05-19 20:18 ` [PATCH RFC 1/5] percpu: return number of released bytes from pcpu_free_area() Roman Gushchin
2020-05-19 20:18 ` [PATCH RFC 2/5] mm: memcg/percpu: account percpu memory to memory cgroups Roman Gushchin
2020-05-26 17:31   ` Tejun Heo
2020-05-27 21:02   ` Dennis Zhou
2020-05-19 20:18 ` [PATCH RFC 3/5] mm: memcg/percpu: per-memcg percpu memory statistics Roman Gushchin
2020-05-19 20:18 ` [PATCH RFC 4/5] mm: memcg: charge memcg percpu memory to the parent cgroup Roman Gushchin
2020-05-19 20:18 ` [PATCH RFC 5/5] kselftests: cgroup: add perpcu memory accounting test Roman Gushchin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).