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

Commit 76c3218c authored by Vijayanand Jitta's avatar Vijayanand Jitta
Browse files

mm : retry for reclaim if lmk kill is possible



should_reclaim_retry could result in premature oom if there
are large number of unaccounted(eg: kgsl and ion pages), and
no reclaimable pages, held by positive adj tasks which will be
freed upon lmk kill. so, retry for reclaim when lmk kill is
possible to avoid premature oom.

Change-Id: I7f6be53e3b1ffdf282c74d68a103134c1da9b7cc
Signed-off-by: default avatarVijayanand Jitta <vjitta@codeaurora.org>
parent 5395b739
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3871,9 +3871,13 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
	 * always increment the no progress counter for them
	 */
	if ((did_some_progress || lmk_kill_possible()) &&
				order <= PAGE_ALLOC_COSTLY_ORDER)
				order <= PAGE_ALLOC_COSTLY_ORDER) {

		*no_progress_loops = 0;
	else

		if (lmk_kill_possible())
			return true;
	} else
		(*no_progress_loops)++;

	/*