+ mm-vmstat-correct-some-wrong-comments-based-on-fls.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/vmstat: correct some wrong comments based-on fls()
has been added to the -mm mm-unstable branch.  Its filename is
     mm-vmstat-correct-some-wrong-comments-based-on-fls.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmstat-correct-some-wrong-comments-based-on-fls.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Chao Xu <Chao.Xu9@xxxxxxxxxxxxx>
Subject: mm/vmstat: correct some wrong comments based-on fls()
Date: Sat, 29 Oct 2022 12:44:36 +0800

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

Link: https://lkml.kernel.org/r/20221029044436.198169-1-xuchao066@xxxxxxx
Signed-off-by: Chao Xu <Chao.Xu9@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmstat.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- a/mm/vmstat.c~mm-vmstat-correct-some-wrong-comments-based-on-fls
+++ a/mm/vmstat.c
@@ -241,17 +241,17 @@ int calculate_normal_threshold(struct zo
 	 * 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);
_

Patches currently in -mm which might be from Chao.Xu9@xxxxxxxxxxxxx are

mm-vmstat-correct-some-wrong-comments-based-on-fls.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux