mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "mm: oom_kill: dump info of all tasks when the FG process is killed"
This commit is contained in:
commit
ced45cc81c
1 changed files with 12 additions and 0 deletions
|
|
@ -1165,6 +1165,10 @@ void pagefault_out_of_memory(void)
|
|||
|
||||
void add_to_oom_reaper(struct task_struct *p)
|
||||
{
|
||||
static DEFINE_RATELIMIT_STATE(reaper_rs, DEFAULT_RATELIMIT_INTERVAL,
|
||||
DEFAULT_RATELIMIT_BURST);
|
||||
struct oom_control oc = {};
|
||||
|
||||
if (!sysctl_reap_mem_on_sigkill)
|
||||
return;
|
||||
|
||||
|
|
@ -1178,5 +1182,13 @@ void add_to_oom_reaper(struct task_struct *p)
|
|||
wake_oom_reaper(p);
|
||||
}
|
||||
task_unlock(p);
|
||||
|
||||
if (__ratelimit(&reaper_rs) && p->signal->oom_score_adj == 0) {
|
||||
show_mem(SHOW_MEM_FILTER_NODES, NULL);
|
||||
show_mem_call_notifiers();
|
||||
if (sysctl_oom_dump_tasks)
|
||||
dump_tasks(&oc);
|
||||
}
|
||||
|
||||
put_task_struct(p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue