lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 12 Apr 2024 19:37:36 +1200
From: Barry Song <21cnbao@...il.com>
To: akpm@...ux-foundation.org,
	linux-mm@...ck.org
Cc: cerasuolodomenico@...il.com,
	chrisl@...nel.org,
	david@...hat.com,
	kasong@...cent.com,
	linux-kernel@...r.kernel.org,
	peterx@...hat.com,
	ryan.roberts@....com,
	surenb@...gle.com,
	v-songbaohua@...o.com,
	willy@...radead.org,
	yosryahmed@...gle.com,
	yuzhao@...gle.com,
	corbet@....net
Subject: [PATCH v5 0/4] mm: add per-order mTHP alloc and swpout counters

From: Barry Song <v-songbaohua@...o.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_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.

-v5:
  * rename anon_alloc to anon_fault_alloc, Barry/Ryan;
  * add anon_fault_fallback_charge, Ryan;
  * move to dynamic alloc_percpu as powerpc's PMD_ORDER is not const,
    kernel test robot;
  * make anon_fault_alloc and anon_fault_fallback more consistent
    with thp_fault_alloc and thp_fault_fallback, Ryan;
  * handle cpu hotplug properly, Ryan;
  * add docs for new sysfs nodes and ABI, Andrew.

-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;
  link:
  https://lore.kernel.org/linux-mm/20240405102704.77559-1-21cnbao@gmail.com/

-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
  mm: add docs for per-order mTHP counters and transhuge_page ABI
  mm: correct the docs for thp_fault_alloc and thp_fault_fallback

 .../sys-kernel-mm-transparent-hugepage        | 17 +++++
 Documentation/admin-guide/mm/transhuge.rst    | 32 ++++++++-
 include/linux/huge_mm.h                       | 53 +++++++++++++++
 mm/huge_memory.c                              | 65 +++++++++++++++++++
 mm/memory.c                                   |  3 +
 mm/page_alloc.c                               |  4 ++
 mm/page_io.c                                  |  1 +
 mm/vmscan.c                                   |  3 +
 8 files changed, 176 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/ABI/testing/sys-kernel-mm-transparent-hugepage

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ