linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: rename no_progress_loops to reclaim_retries. variable no_progress_loops exectly means reclaim retry counts, renameing makes it easier to understand. and has the same style as variable compaction_retries.
@ 2024-06-22  3:28 yongfa.hu
  0 siblings, 0 replies; only message in thread
From: yongfa.hu @ 2024-06-22  3:28 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, hushange

Signed-off-by: yongfa.hu <hushange@163.com>
---
 mm/page_alloc.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9054645ed..1435a9587 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4107,7 +4107,7 @@ bool gfp_pfmemalloc_allowed(gfp_t gfp_mask)
 static inline bool
 should_reclaim_retry(gfp_t gfp_mask, unsigned order,
 		     struct alloc_context *ac, int alloc_flags,
-		     bool did_some_progress, int *no_progress_loops)
+		     bool did_some_progress, int *reclaim_retries)
 {
 	struct zone *zone;
 	struct zoneref *z;
@@ -4119,11 +4119,11 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
 	 * always increment the no progress counter for them
 	 */
 	if (did_some_progress && order <= PAGE_ALLOC_COSTLY_ORDER)
-		*no_progress_loops = 0;
+		*reclaim_retries = 0;
 	else
-		(*no_progress_loops)++;
+		(*reclaim_retries)++;
 
-	if (*no_progress_loops > MAX_RECLAIM_RETRIES)
+	if (*reclaim_retries > MAX_RECLAIM_RETRIES)
 		goto out;
 
 
@@ -4150,7 +4150,7 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
 		wmark = __zone_watermark_ok(zone, order, min_wmark,
 				ac->highest_zoneidx, alloc_flags, available);
 		trace_reclaim_retry_zone(z, order, reclaimable,
-				available, min_wmark, *no_progress_loops, wmark);
+				available, min_wmark, *reclaim_retries, wmark);
 		if (wmark) {
 			ret = true;
 			break;
@@ -4222,14 +4222,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 	enum compact_priority compact_priority;
 	enum compact_result compact_result;
 	int compaction_retries;
-	int no_progress_loops;
+	int reclaim_retries;
 	unsigned int cpuset_mems_cookie;
 	unsigned int zonelist_iter_cookie;
 	int reserve_flags;
 
 restart:
 	compaction_retries = 0;
-	no_progress_loops = 0;
+	reclaim_retries = 0;
 	compact_priority = DEF_COMPACT_PRIORITY;
 	cpuset_mems_cookie = read_mems_allowed_begin();
 	zonelist_iter_cookie = zonelist_iter_begin();
@@ -4390,7 +4390,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 		goto nopage;
 
 	if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags,
-				 did_some_progress > 0, &no_progress_loops))
+				 did_some_progress > 0, &reclaim_retries))
 		goto retry;
 
 	/*
@@ -4427,7 +4427,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 
 	/* Retry as long as the OOM killer is making progress */
 	if (did_some_progress) {
-		no_progress_loops = 0;
+		reclaim_retries = 0;
 		goto retry;
 	}
 
-- 
2.17.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-22  3:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-22  3:28 [PATCH] mm: rename no_progress_loops to reclaim_retries. variable no_progress_loops exectly means reclaim retry counts, renameing makes it easier to understand. and has the same style as variable compaction_retries yongfa.hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox