Skip to contentSkip to conversation

mm: correct the comment when reclaimed pages exceed the scanned pages

PATCH New [email protected] 1 participant 1 message Jun 16, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 5/5 mm: correct the comment when reclaimed pages exceed the scanned pages

From: zhongjiang <[email protected]>
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.

---

 mm/vmpressure.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
mm/vmpressure.c renamed from mm/vmpressure.c~mm-correct-the-comment-when-reclaimed-pages-exceed-the-scanned-pages +3 -3
diff -puN mm/vmpressure.c~mm-correct-the-comment-when-reclaimed-pages-exceed-the-scanned-pages 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;

_