[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5E08DE19-5B71-4245-8908-548BB4FA861F@lca.pw>
Date: Tue, 24 Dec 2019 08:47:15 -0500
From: Qian Cai <cai@....pw>
To: Miles Chen <miles.chen@...iatek.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-mediatek@...ts.infradead.org,
wsd_upstream@...iatek.com
Subject: Re: [PATCH] mm/page_owner: print largest memory consumer when OOM panic occurs
> On Dec 24, 2019, at 1:45 AM, Miles Chen <miles.chen@...iatek.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?
Powered by blists - more mailing lists