]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: add per-order mTHP swpin counters
authorBarry Song <v-songbaohua@oppo.com>
Sat, 26 Oct 2024 08:24:23 +0000 (21:24 +1300)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:29 +0000 (21:29 -0700)
commite18779e6631371bc911f3e6ac2dadb6e90e6cdc0
treeff104539737a7898d640cc5dc2790b9b68020d09
parenta22a51e5a57077383a13dfbc334878ccfa3cc702
mm: add per-order mTHP swpin counters

This helps profile the sizes of folios being swapped in. Currently,
only mTHP swap-out is being counted.
The new interface can be found at:
/sys/kernel/mm/transparent_hugepage/hugepages-<size>/stats
         swpin
For example,
cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/swpin
12809
cat /sys/kernel/mm/transparent_hugepage/hugepages-32kB/stats/swpin
4763

Link: https://lkml.kernel.org/r/20241026082423.26298-1-21cnbao@gmail.com
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Yosry Ahmed <yosryahmed@google.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Kairui Song <kasong@tencent.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
Cc: Usama Arif <usamaarif642@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/mm/transhuge.rst
include/linux/huge_mm.h
mm/huge_memory.c
mm/page_io.c