linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] mm: add per-order mTHP alloc and swpout counters
@ 2024-04-05 10:27 Barry Song
  2024-04-05 10:27 ` [PATCH v4 1/2] mm: add per-order mTHP anon_alloc and anon_alloc_fallback counters Barry Song
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Barry Song @ 2024-04-05 10:27 UTC (permalink / raw)
  To: david, akpm, linux-mm, ryan.roberts
  Cc: cerasuolodomenico, chrisl, kasong, peterx, surenb, v-songbaohua,
	willy, yosryahmed, yuzhao, linux-kernel

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

The patchset introduces a framework to facilitate mTHP counters, starting
with the allocation and swap-out counters. Currently, only four new nodes
are appended to the stats directory for each mTHP size.

/sys/kernel/mm/transparent_hugepage/hugepages-<size>/stats
	anon_alloc
	anon_alloc_fallback
	anon_swpout
	anon_swpout_fallback

These four nodes are crucial for us to monitor the fragmentation levels of
both the buddy system and the swapfile. In the future, we may consider
adding additional nodes for further insights.

-v4:
  * Many thanks to David and Ryan for your patience and valuable insights
    throughout the numerous renaming efforts!
  * Guard the case order > PMD_ORDER in count func rather than in callers,
    Ryan;
  * Add swpout counters;
  * Add a helper DEFINE_MTHP_STAT_ATTR to avoid code duplication for various
    counters;

-v3:
  https://lore.kernel.org/linux-mm/20240403035502.71356-1-21cnbao@gmail.com/

Barry Song (2):
  mm: add per-order mTHP anon_alloc and anon_alloc_fallback counters
  mm: add per-order mTHP anon_swpout and anon_swpout_fallback counters

 include/linux/huge_mm.h | 21 +++++++++++++++++
 mm/huge_memory.c        | 52 +++++++++++++++++++++++++++++++++++++++++
 mm/memory.c             |  2 ++
 mm/page_io.c            |  6 ++++-
 mm/vmscan.c             |  3 +++
 5 files changed, 83 insertions(+), 1 deletion(-)

-- 
2.34.1



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

end of thread, other threads:[~2024-04-12  9:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05 10:27 [PATCH v4 0/2] mm: add per-order mTHP alloc and swpout counters Barry Song
2024-04-05 10:27 ` [PATCH v4 1/2] mm: add per-order mTHP anon_alloc and anon_alloc_fallback counters Barry Song
2024-04-11 16:38   ` Ryan Roberts
2024-04-11 22:40     ` Barry Song
2024-04-12  9:16       ` Ryan Roberts
2024-04-12  9:27         ` Barry Song
2024-04-05 10:27 ` [PATCH v4 2/2] mm: add per-order mTHP anon_swpout and anon_swpout_fallback counters Barry Song
2024-04-11 16:43   ` Ryan Roberts
2024-04-11 21:52     ` Barry Song
2024-04-05 20:11 ` [PATCH v4 0/2] mm: add per-order mTHP alloc and swpout counters Andrew Morton
2024-04-05 22:04   ` Barry Song
2024-04-11 16:45     ` Ryan Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox