mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
Merge "mm/oom_kill: Online memory before running oom-killer"
This commit is contained in:
commit
c08fc62dee
1 changed files with 7 additions and 5 deletions
|
|
@ -1090,6 +1090,13 @@ bool out_of_memory(struct oom_control *oc)
|
|||
|
||||
if (oom_killer_disabled)
|
||||
return false;
|
||||
|
||||
if (try_online_one_block(numa_node_id())) {
|
||||
/* Got some memory back */
|
||||
WARN(1, "OOM killer had to online a memory block\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PRIORITIZE_OOM_TASKS
|
||||
oc->min_kill_adj = OOM_SCORE_ADJ_MIN;
|
||||
#endif
|
||||
|
|
@ -1157,11 +1164,6 @@ bool out_of_memory(struct oom_control *oc)
|
|||
#endif
|
||||
|
||||
if (!oc->chosen) {
|
||||
if (try_online_one_block(numa_node_id())) {
|
||||
/* Got some memory back */
|
||||
WARN(1, "OOM killer had to online a memory block\n");
|
||||
return true;
|
||||
}
|
||||
check_panic_on_oom(oc);
|
||||
select_bad_process(oc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue