mbox series

[0/2] mm: memcontrol: cleanup and optimize for accounting params

Message ID 20220830055949.12640-1-ryncsn@gmail.com (mailing list archive)
Headers show
Series mm: memcontrol: cleanup and optimize for accounting params | expand

Message

Kairui Song Aug. 30, 2022, 5:59 a.m. UTC
From: Kairui Song <kasong@tencent.com>

Patch 1/2 changes the behavior of kmem accounting a bit, making
it either globally enabled or globally disabled by boot params and
no longer affected by the creation of the first non-root cgroup.
This might be a bit arguable though.

Patch 2/2 optimizes some hot paths by making cgroup_memory_noswap a
static key, benchmark shows swap paths now have a ~4% lower overhead.

Kairui Song (2):
  mm: memcontrol: remove mem_cgroup_kmem_disabled
  mm: memcontrol: make cgroup_memory_noswap a static key

 include/linux/memcontrol.h |  8 +------
 mm/memcontrol.c            | 45 +++++++++++++++++++++++---------------
 mm/percpu.c                |  2 +-
 mm/slab_common.c           |  2 +-
 4 files changed, 30 insertions(+), 27 deletions(-)