Skip to contentSkip to conversation

mm/vmscan: fix comment logic in balance_pgdat

PATCH Superseded Enlin Mu 2 participants 2 messages Aug 21

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Enlin Mu

author
#0 lore raw

PATCH 1/1 mm/vmscan: fix comment logic in balance_pgdat

In balance_pgdat(), when the low watermark is met, processes sleeping on pfmemalloc_wait are woken up because they are able to safely make forward progress.

However, the comment incorrectly states "they should not be able", which contradicts the actual code behavior. Fix this typo to accurately reflect the logic.

No functional changes are introduced.

---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
index 35c3bb15ae96..822f73758c42 100644
@@ -7188,7 +7188,7 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int highest_zoneidx)
 
 		/*
 		 * If the low watermark is met there is no need for processes
-		 * to be throttled on pfmemalloc_wait as they should not be
+		 * to be throttled on pfmemalloc_wait as they should be
 		 * able to safely make forward progress. Wake them
 		 */
 		if (waitqueue_active(&pgdat->pfmemalloc_wait) &&
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 21 lines · Enlin Mu

In balance_pgdat(), when the low watermark is met, processes sleeping on pfmemalloc_wait are woken up because they are able to safely make forward progress.

However, the comment incorrectly states "they should not be able", which contradicts the actual code behavior. Fix this typo to accurately reflect the logic.

No functional changes are introduced.

---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +0 -0
index 35c3bb15ae96..822f73758c42 100644

mm/vmscan.c static int balance_pgdat(pg_data_t *pgdat, int order, int highest_zoneidx) · line 7191

Quoted 5 lines
mm/vmscan.c +1 -1
@@ -7188,7 +7188,7 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int highest_zoneidx)
 
 		/*
 		 * If the low watermark is met there is no need for processes
-		 * to be throttled on pfmemalloc_wait as they should not be
+		 * to be throttled on pfmemalloc_wait as they should be

Pretty sure this was supposed to be "now" instead of "not". That would make more sense than removing it, since this is about the watermark check after kswapd has performed reclaim.

Quoted 3 lines
mm/vmscan.c +0 -0
 		 * able to safely make forward progress. Wake them
 		 */
 		if (waitqueue_active(&pgdat->pfmemalloc_wait) &&