mm, oom: run the showmem notifier in oom

When the oom starts killing processes, it's useful to
be able to see the state of unaccounted memory in the system. Call the
showmem notifier to get other clients to dump out their state.

Change-Id: Id32ff6d6747fee7d0889447323ddce25282e93f6
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
[swatsrid@codeaurora.org: Fix trivial errors and merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
[isaacm@codeaurora.org: Fix trivial merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Prakash Gupta 2017-08-02 15:16:35 +05:30 • committed by Gerrit - the friendly Code Review server
commit e270acd222

View file

@ -42,6 +42,7 @@
#include <linux/kthread.h>
#include <linux/init.h>
#include <linux/mmu_notifier.h>
#include <linux/show_mem_notifier.h>
#include <asm/tlb.h>
#include "internal.h"
@ -464,7 +465,10 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
if (is_dump_unreclaim_slabs())
dump_unreclaimable_slab();
show_mem_call_notifiers();
}
if (sysctl_oom_dump_tasks)
dump_tasks(oc);
if (p)