Re: [PATCH] mm/page_owner: print largest memory consumer when OOM panic occurs

From: Miles Chen
Date: Fri Dec 27 2019 - 03:01:05 EST


On Thu, 2019-12-26 at 00:53 -0500, Qian Cai wrote:
>
> > On Dec 25, 2019, at 11:01 PM, Miles Chen <miles.chen@xxxxxxxxxxxx> wrote:
> >
> > That is what the patch does -- targeting on the memory leakage which causes an OOM kernel panic, so the greatest consumer information helps (the amount of leakage is big enough to cause an OOM kernel panic)
> >
> > I've posted the number of real problems since 2019/5 I solved by this approach.
>
> The point is in order to make your debugging patch upstream, it has to be general useful. Right now,

> it feels rather situational for me for the reasons given in the previous emails.


It's not complete situation.

I've listed different OOM panic situations in previous email [1]
and what we can do about them with current information.

There are some cases which cannot be covered by current information
easily.
For example: a memory leakage caused by alloc_pages() or vmalloc() with
a large size.
I keep seeing these issues for years and that's why I built this patch.
It's like a missing piece of the puzzle.

To prove that the approach is practical and useful, I have collected
real test cases
under real devices and posted the test result in the commit message.
These are real cases, not my imagination.

[1] https://lkml.org/lkml/2019/12/25/53


thanks again for your comments

Miles