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

Commit eba0983e authored by Prakash Gupta's avatar Prakash Gupta
Browse files

mm, oom: check LMK enabled for pagefault_out_of_memory()



Rely on LMK to reclaim memory and avoid OOM, when out of memory
condition is detected in a pagefault.

pagefault_out_of_memory() may be called due to commit d1b75390 ("mm:
reduce the time spend by killed tasks in alloc path"), which bails out from
alloc_pages_slowpath() if the current task has been killed.

Change-Id: Icfdaa51d7cfb0dfe9a665bcff23357101b15f421
Signed-off-by: default avatarPrakash Gupta <guptap@codeaurora.org>
parent 5cad42a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1223,6 +1223,10 @@ void pagefault_out_of_memory(void)
		.order = 0,
	};

	if (IS_ENABLED(CONFIG_HAVE_LOW_MEMORY_KILLER) ||
	    IS_ENABLED(CONFIG_HAVE_USERSPACE_LOW_MEMORY_KILLER))
		return;

	if (mem_cgroup_oom_synchronize(true))
		return;