linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org
Cc: baolin.wang@linux.alibaba.com, chrisl@kernel.org,
	david@redhat.com, hanchuanhua@oppo.com, ioworker0@gmail.com,
	kaleshsingh@google.com, kasong@tencent.com,
	linux-kernel@vger.kernel.org, ryan.roberts@arm.com,
	usamaarif642@gmail.com, v-songbaohua@oppo.com,
	yuanshuai@oppo.com, ziy@nvidia.com
Subject: [PATCH v4 0/2] mm: count the number of anonymous THPs per size
Date: Sat, 24 Aug 2024 13:04:39 +1200	[thread overview]
Message-ID: <20240824010441.21308-1-21cnbao@gmail.com> (raw)

From: Barry Song <v-songbaohua@oppo.com>

Knowing the number of transparent anon THPs in the system is crucial
for performance analysis. It helps in understanding the ratio and
distribution of THPs versus small folios throughout the system.

Additionally, partial unmapping by userspace can lead to significant waste
of THPs over time and increase memory reclamation pressure. We need this
information for comprehensive system tuning.

-v4:
 * collect David's acked-by, thanks!
 * refine subjects, changelogs and docs according to David's comment,
   thanks very much!

-v3:
 https://lore.kernel.org/linux-mm/20240822224015.93186-1-21cnbao@gmail.com/
 * collect David's acked-by, thanks!
 * rename nr_split_deferred to meaningful name - nr_anon_partially_mapped,
   per David. Ryan, I assume you will like it after you come back :-)

-v2:
 https://lore.kernel.org/linux-mm/20240811224940.39876-1-21cnbao@gmail.com/
 * don't rely on rmap to implement - 1, uses folio_free, split etc.
   Thanks for David's comment;
 * rename sys counters and refine doc. Thanks for Ryan's comment;

-v1:
 https://lore.kernel.org/all/20240808010457.228753-1-21cnbao@gmail.com/

Barry Song (2):
  mm: count the number of anonymous THPs per size
  mm: count the number of partially mapped anonymous THPs per size

 Documentation/admin-guide/mm/transhuge.rst | 12 ++++++++++++
 include/linux/huge_mm.h                    | 16 ++++++++++++++--
 mm/huge_memory.c                           | 19 ++++++++++++++++---
 mm/migrate.c                               |  4 ++++
 mm/page_alloc.c                            |  5 ++++-
 mm/rmap.c                                  |  1 +
 6 files changed, 51 insertions(+), 6 deletions(-)

-- 
2.39.3 (Apple Git-146)



             reply	other threads:[~2024-08-24  1:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-24  1:04 Barry Song [this message]
2024-08-24  1:04 ` [PATCH v4 1/2] mm: count the number of anonymous THPs per size Barry Song
2024-08-26  6:35   ` David Hildenbrand
2024-09-09 19:56   ` chunpeng lee
2024-08-24  1:04 ` [PATCH v4 2/2] mm: count the number of partially mapped " Barry Song

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=20240824010441.21308-1-21cnbao@gmail.com \
    --to=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=chrisl@kernel.org \
    --cc=david@redhat.com \
    --cc=hanchuanhua@oppo.com \
    --cc=ioworker0@gmail.com \
    --cc=kaleshsingh@google.com \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=usamaarif642@gmail.com \
    --cc=v-songbaohua@oppo.com \
    --cc=yuanshuai@oppo.com \
    --cc=ziy@nvidia.com \
    /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 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).