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

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

Merge "mm: vmscan: do not continue scanning if reclaim was aborted for compaction"

parents 3fff87e3 a0901266
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2447,8 +2447,10 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
		aborted_reclaim = shrink_zones(zonelist, sc);

		/*
		 * Don't shrink slabs when reclaiming memory from
		 * over limit cgroups
		 * Don't shrink slabs when reclaiming memory from over limit
		 * cgroups but do shrink slab at least once when aborting
		 * reclaim for compaction to avoid unevenly scanning file/anon
		 * LRU pages over slab pages.
		 */
		if (global_reclaim(sc)) {
			unsigned long lru_pages = 0;
@@ -2490,7 +2492,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
						WB_REASON_TRY_TO_FREE_PAGES);
			sc->may_writepage = 1;
		}
	} while (--sc->priority >= 0);
	} while (--sc->priority >= 0 && !aborted_reclaim);

out:
	delayacct_freepages_end();