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

Commit 5c8d0983 authored by Ashwini Muduganti's avatar Ashwini Muduganti Committed by Gerrit - the friendly Code Review server
Browse files

mm: avoid order-0 OOMs when there are LMK killable tasks



There is a case reported where there are lot of processes killable by
lowmemorykiller. One of the context P1 is in lowmem_scan holding the
mutex. System is slow due to stress test and P1 is taking time to
complete. This causes other tasks in direct reclaim path deplete their
MAX_RECLAIM_RETRIES and result in OOM. Allow non-costly allocs to retry
till there are no lowmemorykiller killable tasks.

Change-Id: I5532fff6889ad57ab3fb09bebe4b9256eb098e69
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: default avatarAshwini Muduganti <amudug@codeaurora.org>
parent dd6a811f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3870,7 +3870,8 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
	 * their order will become available due to high fragmentation so
	 * always increment the no progress counter for them
	 */
	if (did_some_progress && order <= PAGE_ALLOC_COSTLY_ORDER)
	if ((did_some_progress || lmk_kill_possible()) &&
				order <= PAGE_ALLOC_COSTLY_ORDER)
		*no_progress_loops = 0;
	else
		(*no_progress_loops)++;