All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Muchun Song <muchun.song@linux.dev>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Frank van der Linden <fvdl@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Roman Gushchin <roman.gushchin@getcruise.com>
Subject: [PATCH v1 0/4] Page counters optimizations
Date: Fri,  3 May 2024 13:18:31 -0700	[thread overview]
Message-ID: <20240503201835.2969707-1-roman.gushchin@linux.dev> (raw)

From: Roman Gushchin <roman.gushchin@getcruise.com>

This patchset reorganizes page_counter structures which helps to make
memory cgroup and hugetlb cgroup structures smaller (20%-35%) and
more cache-effective. It also eliminates useless tracking of protected
memory usage when it's not needed.

include/linux/hugetlb.h        |   4 +-
 include/linux/hugetlb_cgroup.h |   9 +---
 include/linux/memcontrol.h     |  15 ++----
 include/linux/page_counter.h   |  88 +++++++++++++++++++++++++-------
 mm/hugetlb.c                   |  14 +++--
 mm/hugetlb_cgroup.c            | 150 ++++++++++++++++++++----------------------------------
 mm/memcontrol.c                | 351 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------------
 mm/page_counter.c              |  76 ++++++++++++++++++----------
 8 files changed, 340 insertions(+), 367 deletions(-)


Roman Gushchin (4):
  mm: memcg: convert enum res_type to mem_counter_type
  mm: memcg: merge multiple page_counters into a single structure
  mm: memcg: don't call propagate_protected_usage() needlessly
  mm: page_counters: initialize usage using ATOMIC_LONG_INIT() macro

 include/linux/hugetlb.h        |   4 +-
 include/linux/hugetlb_cgroup.h |   9 +-
 include/linux/memcontrol.h     |  15 +-
 include/linux/page_counter.h   |  88 +++++++--
 mm/hugetlb.c                   |  14 +-
 mm/hugetlb_cgroup.c            | 150 +++++---------
 mm/memcontrol.c                | 351 ++++++++++++++-------------------
 mm/page_counter.c              |  76 ++++---
 8 files changed, 340 insertions(+), 367 deletions(-)

-- 
2.43.2



             reply	other threads:[~2024-05-03 20:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 20:18 Roman Gushchin [this message]
2024-05-03 20:18 ` [PATCH v1 1/4] mm: memcg: convert enum res_type to mem_counter_type Roman Gushchin
2024-05-03 20:18 ` [PATCH v1 2/4] mm: memcg: merge multiple page_counters into a single structure Roman Gushchin
2024-05-03 21:11   ` Shakeel Butt
2024-05-03 21:18     ` Roman Gushchin
2024-05-08  0:26       ` T.J. Mercier
2024-05-08  2:07         ` Roman Gushchin
2024-05-10  7:15   ` kernel test robot
2024-05-10  7:15     ` [LTP] " kernel test robot
2024-05-03 20:18 ` [PATCH v1 3/4] mm: memcg: don't call propagate_protected_usage() needlessly Roman Gushchin
2024-05-03 20:18 ` [PATCH v1 4/4] mm: page_counters: initialize usage using ATOMIC_LONG_INIT() macro Roman Gushchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240503201835.2969707-1-roman.gushchin@linux.dev \
    --to=roman.gushchin@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=fvdl@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@getcruise.com \
    --cc=shakeel.butt@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.