Re: [PATCH v6 0/4] mm: add per-order mTHP alloc and swpout counters

From: David Hildenbrand
Date: Fri Apr 12 2024 - 08:54:23 EST


On 12.04.24 13:48, Barry Song wrote:
From: Barry Song <v-songbaohua@xxxxxxxx>

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_fault_alloc
anon_fault_fallback
anon_fault_fallback_charge
anon_swpout
anon_swpout_fallback

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

-v6:
* collect reviewed-by tags for patch2/4, 3/4, 4/4, Ryan;
* move back to static array by using MAX_PTRS_PER_PTE, Ryan;
* move to for_each_possible_cpu to handle cpu hotplug, Ryan;
* other minor cleanups according to Ryan;

Please *really* not multiple versions of the same patch set on one a single day.

--
Cheers,

David / dhildenb