mbox series

[v3,0/3] mm: memcg: page counters optimizations

Message ID 20240726203110.1577216-1-roman.gushchin@linux.dev (mailing list archive)
Headers show
Series mm: memcg: page counters optimizations | expand

Message

Roman Gushchin July 26, 2024, 8:31 p.m. UTC
This patchset contains 3 independent small optimizations of page counters.

v3:
  - dropped the main part based on a feedback from Johannes
  - rebased on top of current mm-unstable
v2:
  - two page_counter structures per hugetlb cgroup instead of one
  - rebased to the current mm branch
  - many minor fixes and improvements
v1:
  https://lore.kernel.org/lkml/20240503201835.2969707-1-roman.gushchin@linux.dev/T/#m77151ed83451a49132e29ef13d55e08b95ac867f


Roman Gushchin (3):
  mm: memcg: don't call propagate_protected_usage() needlessly
  mm: page_counters: put page_counter_calculate_protection() under
    CONFIG_MEMCG
  mm: page_counters: initialize usage using ATOMIC_LONG_INIT() macro

 include/linux/page_counter.h | 16 ++++++++++++++--
 mm/hugetlb_cgroup.c          |  4 ++--
 mm/memcontrol.c              | 16 ++++++++--------
 mm/page_counter.c            | 18 +++++++++++++++---
 4 files changed, 39 insertions(+), 15 deletions(-)