Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 258e8b27 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: remove unnecessary back-off function when retrying page reclaim"

parents a77d5a7a 94d596c1
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -3494,11 +3494,10 @@ bool gfp_pfmemalloc_allowed(gfp_t gfp_mask)
/*
 * Checks whether it makes sense to retry the reclaim to make a forward progress
 * for the given allocation request.
 * The reclaim feedback represented by did_some_progress (any progress during
 * the last reclaim round) and no_progress_loops (number of reclaim rounds without
 * any progress in a row) is considered as well as the reclaimable pages on the
 * applicable zone list (with a backoff mechanism which is a function of
 * no_progress_loops).
 *
 * We give up when we either have tried MAX_RECLAIM_RETRIES in a row
 * without success, or when we couldn't even meet the watermark if we
 * reclaimed all remaining pages on the LRU lists.
 *
 * Returns true if a retry is viable or false to enter the oom path.
 */
@@ -3541,13 +3540,11 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
		unsigned long reclaimable;

		available = reclaimable = zone_reclaimable_pages(zone);
		available -= DIV_ROUND_UP((*no_progress_loops) * available,
					  MAX_RECLAIM_RETRIES);
		available += zone_page_state_snapshot(zone, NR_FREE_PAGES);

		/*
		 * Would the allocation succeed if we reclaimed the whole
		 * available?
		 * Would the allocation succeed if we reclaimed all
		 * reclaimable pages?
		 */
		if (__zone_watermark_ok(zone, order, min_wmark_pages(zone),
				ac_classzone_idx(ac), alloc_flags, available)) {