From e270acd2227a982554ff43fa89b9baef76abeb8b Mon Sep 17 00:00:00 2001 From: Prakash Gupta Date: Wed, 2 Aug 2017 15:16:35 +0530 Subject: [PATCH] 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 [swatsrid@codeaurora.org: Fix trivial errors and merge conflicts] Signed-off-by: Swathi Sridhar [isaacm@codeaurora.org: Fix trivial merge conflicts] Signed-off-by: Isaac J. Manjarres --- mm/oom_kill.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 71e3acea7817..3d24305f758f 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #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)