[PATCH v2] mm/vmscan: fix comment logic in balance_pgdat

Enlin Mu posted 1 patch 1 month, 1 week ago
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] mm/vmscan: fix comment logic in balance_pgdat
Posted by Enlin Mu 1 month, 1 week ago
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.

Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 35c3bb15ae96..8c4766b4c29c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -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 now be
 		 * able to safely make forward progress. Wake them
 		 */
 		if (waitqueue_active(&pgdat->pfmemalloc_wait) &&
-- 
2.39.5
Re: [PATCH v2] mm/vmscan: fix comment logic in balance_pgdat
Posted by Shakeel Butt 1 month ago
On Fri, Aug 21, 2026 at 02:40:57PM +0800, Enlin Mu wrote:
> 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.
> 
> Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
> Signed-off-by: Enlin Mu <enlin.mu@linux.dev>

Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Re: [PATCH v2] mm/vmscan: fix comment logic in balance_pgdat
Posted by Johannes Weiner 1 month ago
On Fri, Aug 21, 2026 at 02:40:57PM +0800, Enlin Mu wrote:
> 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.
> 
> Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
> Signed-off-by: Enlin Mu <enlin.mu@linux.dev>

Looks good, thanks for updating the patch.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Re: [PATCH v2] mm/vmscan: fix comment logic in balance_pgdat
Posted by Barry Song 1 month, 1 week ago
On Fri, Aug 21, 2026 at 2:41 PM Enlin Mu <enlin.mu@linux.dev> wrote:
>
> 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.
>
> Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
> Signed-off-by: Enlin Mu <enlin.mu@linux.dev>

Thanks to Johannes for pointing out the "not" and "now" issues in v1.

I followed Johannes's comments. I also feel that the patch looks good.

Reviewed-by: Barry Song <baohua@kernel.org>