[patch 5/5] mm: correct the comment when reclaimed pages exceed the scanned pages

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

 



From: zhongjiang <zhongjiang@xxxxxxxxxx>
Subject: mm: correct the comment when reclaimed pages exceed the scanned pages

e1587a494540 ("mm: vmpressure: fix sending wrong events on underflow")
declare that reclaimed pages exceed the scanned pages due to the thp
reclaim.  it is incorrect because THP will be spilt to normal page and
loop again.  which will result in the scanned pages increment.

[akpm@xxxxxxxxxxxxxxxxxxxx: tweak comment text]
Link: http://lkml.kernel.org/r/1496824266-25235-1-git-send-email-zhongjiang@xxxxxxxxxx
Signed-off-by: zhongjiang <zhongjiang@xxxxxxxxxx>
Acked-by: Minchan Kim <minchan@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmpressure.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN mm/vmpressure.c~mm-correct-the-comment-when-reclaimed-pages-exceed-the-scanned-pages mm/vmpressure.c
--- a/mm/vmpressure.c~mm-correct-the-comment-when-reclaimed-pages-exceed-the-scanned-pages
+++ a/mm/vmpressure.c
@@ -115,9 +115,9 @@ static enum vmpressure_levels vmpressure
 	unsigned long pressure = 0;
 
 	/*
-	 * reclaimed can be greater than scanned in cases
-	 * like THP, where the scanned is 1 and reclaimed
-	 * could be 512
+	 * reclaimed can be greater than scanned for things such as reclaimed
+	 * slab pages. shrink_node() just adds reclaimed pages without a
+	 * related increment to scanned pages.
 	 */
 	if (reclaimed >= scanned)
 		goto out;
_
--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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