From: Qian Cai <cai@lca.pw>
To: Miles Chen <miles.chen@mediatek.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com
Subject: Re: [PATCH] mm/page_owner: print largest memory consumer when OOM panic occurs
Date: Tue, 24 Dec 2019 08:47:15 -0500 [thread overview]
Message-ID: <5E08DE19-5B71-4245-8908-548BB4FA861F@lca.pw> (raw)
In-Reply-To: <1577169946.4959.4.camel@mtkswgap22>
> On Dec 24, 2019, at 1:45 AM, Miles Chen <miles.chen@mediatek.com> wrote:
>
> We use kmemleak too, but a memory leakage which is caused by
> alloc_pages() in a kernel device driver cannot be caught by kmemleak.
> We have fought against this kind of real problems for a few years and
> find a way to make the debugging easier.
>
> We currently have information during OOM: process Node, zone, swap,
> process (pid, rss, name), slab usage, and the backtrace, order, and
> gfp flags of the OOM backtrace.
> We can tell many different types of OOM problems by the information
> above except the alloc_pages() leakage.
>
> The patch does work and save a lot of debugging time.
> Could we consider the "greatest memory consumer" as another useful
> OOM information?
This is rather situational considering there are memory leaks here and there but it is not necessary that straightforward as a single place of greatest consumer.
The other question is why the offensive drivers that use alloc_pages() repeatedly without using any object allocator? Do you have examples of this in drivers that could happen?
next prev parent reply other threads:[~2019-12-24 13:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 11:33 Miles Chen
2019-12-23 12:32 ` Qian Cai
2019-12-24 6:45 ` Miles Chen
2019-12-24 13:47 ` Qian Cai [this message]
2019-12-25 9:29 ` Miles Chen
2019-12-25 13:53 ` Qian Cai
[not found] <20191226040114.8123-1-miles.chen@mediatek.com>
2019-12-26 5:53 ` Qian Cai
[not found] <1577432670.4248.3.camel@mtkswgap22>
2019-12-27 13:46 ` Qian Cai
[not found] <1577669436.25204.8.camel@mtkswgap22>
2019-12-30 1:51 ` Qian Cai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5E08DE19-5B71-4245-8908-548BB4FA861F@lca.pw \
--to=cai@lca.pw \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=miles.chen@mediatek.com \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox