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

Commit 6d9db847 authored by Patrick Daly's avatar Patrick Daly
Browse files

mm/oom-kill: Allow __GFP_RETRY_MAYFAIL to fail fast



This flag indicates that the memory request may fail, if
the system is low on memory. The caller is prepared to handle
this scenario.

Change-Id: Ie4be1f3048196a38946d08f7355e2673e097018c
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 2aacc297
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -139,6 +139,9 @@ bool should_ulmk_retry(gfp_t gfp_mask)
	if (!sysctl_panic_on_oom)
		return false;

	if (gfp_mask & __GFP_RETRY_MAYFAIL)
		return false;

	/* Someone else is already checking. */
	if (!mutex_trylock(&ulmk_retry_lock))
		return true;