mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
oom, oom_reaper: try to reap tasks which skip regular OOM killer path
If either the current task is already killed or PF_EXITING or a selected task is PF_EXITING then the oom killer is suppressed and so is the oom reaper. This patch adds try_oom_reaper which checks the given task and queues it for the oom reaper if that is safe to be done meaning that the task doesn't share the mm with an alive process. This might help to release the memory pressure while the task tries to exit. [[email protected]: fix nommu build] Signed-off-by: Michal Hocko <[email protected]> Cc: Raushaniya Maksudova <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: David Rientjes <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Oleg Nesterov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3da88fb3ba
commit
3ef22dfff2
3 changed files with 77 additions and 18 deletions
|
|
@ -1275,6 +1275,7 @@ static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
|
|||
*/
|
||||
if (fatal_signal_pending(current) || task_will_free_mem(current)) {
|
||||
mark_oom_victim(current);
|
||||
try_oom_reaper(current);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue