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>] [day] [month] [year] [list]
Date:   Sat, 29 Oct 2022 12:44:36 +0800
From:   Chao Xu <xuchao066@....com>
To:     akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Chao Xu <Chao.Xu9@...krlife.com>
Subject: [PATCH] mm/vmstat: correct some wrong comments based-on fls()

From: Chao Xu <Chao.Xu9@...krlife.com>

The threshold should grow logarithmically, using fls() as
an easy approximation. But there are some errors in fls(mem)
and fls(Processors). It is missleading so lets correct it.

Signed-off-by: Chao Xu <Chao.Xu9@...krlife.com>
---
 mm/vmstat.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index b2371d745e00..df44b6b9e447 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -241,17 +241,17 @@ int calculate_normal_threshold(struct zone *zone)
 	 * 28		2		2	4-8 GB		7
 	 * 32		2		2	8-16 GB		8
 	 * 4		2		2	<128M		1
-	 * 30		4		3	2-4 GB		5
+	 * 30		4		3	2-4 GB		6
 	 * 48		4		3	8-16 GB		8
-	 * 32		8		4	1-2 GB		4
+	 * 32		8		4	1-2 GB		5
 	 * 32		8		4	0.9-1GB		4
 	 * 10		16		5	<128M		1
 	 * 40		16		5	900M		4
-	 * 70		64		7	2-4 GB		5
-	 * 84		64		7	4-8 GB		6
-	 * 108		512		9	4-8 GB		6
-	 * 125		1024		10	8-16 GB		8
-	 * 125		1024		10	16-32 GB	9
+	 * 70		64		7	2-4 GB		6
+	 * 84		64		7	4-8 GB		7
+	 * 108		512		10	4-8 GB		7
+	 * 125		1024		11	8-16 GB		8
+	 * 125		1024		11	16-32 GB	9
 	 */
 
 	mem = zone_managed_pages(zone) >> (27 - PAGE_SHIFT);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ