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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240412114858.407208-5-21cnbao@gmail.com>
Date: Fri, 12 Apr 2024 23:48:58 +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 v6 4/4] mm: correct the docs for thp_fault_alloc and thp_fault_fallback

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

The documentation does not align with the code. In
__do_huge_pmd_anonymous_page(), THP_FAULT_FALLBACK is incremented when
mem_cgroup_charge() fails, despite the allocation succeeding, whereas
THP_FAULT_ALLOC is only incremented after a successful charge.

Signed-off-by: Barry Song <v-songbaohua@...o.com>
Reviewed-by: Ryan Roberts <ryan.roberts@....com>
Cc: Chris Li <chrisl@...nel.org>
Cc: David Hildenbrand <david@...hat.com>
Cc: Domenico Cerasuolo <cerasuolodomenico@...il.com>
Cc: Kairui Song <kasong@...cent.com>
Cc: Matthew Wilcox (Oracle) <willy@...radead.org>
Cc: Peter Xu <peterx@...hat.com>
Cc: Ryan Roberts <ryan.roberts@....com>
Cc: Suren Baghdasaryan <surenb@...gle.com>
Cc: Yosry Ahmed <yosryahmed@...gle.com>
Cc: Yu Zhao <yuzhao@...gle.com>
Cc: Jonathan Corbet <corbet@....net>
---
 Documentation/admin-guide/mm/transhuge.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
index e0fe17affeb3..f82300b9193f 100644
--- a/Documentation/admin-guide/mm/transhuge.rst
+++ b/Documentation/admin-guide/mm/transhuge.rst
@@ -369,7 +369,7 @@ monitor how successfully the system is providing huge pages for use.
 
 thp_fault_alloc
 	is incremented every time a huge page is successfully
-	allocated to handle a page fault.
+	allocated and charged to handle a page fault.
 
 thp_collapse_alloc
 	is incremented by khugepaged when it has found
@@ -377,7 +377,7 @@ thp_collapse_alloc
 	successfully allocated a new huge page to store the data.
 
 thp_fault_fallback
-	is incremented if a page fault fails to allocate
+	is incremented if a page fault fails to allocate or charge
 	a huge page and instead falls back to using small pages.
 
 thp_fault_fallback_charge
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ