mm: rename no_progress_loops to reclaim_retris variable no_progress_loops exectly means reclaim retry counts, renameing makes it easier to understand. and has the same style as variable compaction_retries.
Subsystems (2)
PATCH 1/1 mm: rename no_progress_loops to reclaim_retris variable no_progress_loops exectly means reclaim retry counts, renameing makes it easier to understand. and has the same style as variable compaction_retries.
Signed-off-by yongfa.hu <[email protected]>
--- mm/page_alloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
mm/page_alloc.c +9 -9
@@ -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; }
Signature · 1 line
2.17.1