From: Catalin Marinas <catalin.marinas@arm.com>
To: Li Zefan <lizefan@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH v2 1/3] kmemleak: allow freeing internal objects after kmemleak was disabled
Date: Thu, 27 Mar 2014 12:21:39 +0000 [thread overview]
Message-ID: <20140327122139.GH20298@arm.com> (raw)
In-Reply-To: <53338CFE.3060705@huawei.com>
On Thu, Mar 27, 2014 at 02:29:18AM +0000, Li Zefan wrote:
> On 2014/3/22 7:37, Catalin Marinas wrote:
> > On 17 Mar 2014, at 04:07, Li Zefan <lizefan@huawei.com> wrote:
> >> Currently if kmemleak is disabled, the kmemleak objects can never be freed,
> >> no matter if it's disabled by a user or due to fatal errors.
> >>
> >> Those objects can be a big waste of memory.
> >>
> >> OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME
> >> 1200264 1197433 99% 0.30K 46164 26 369312K kmemleak_object
> >>
> >> With this patch, internal objects will be freed immediately if kmemleak is
> >> disabled explicitly by a user. If it's disabled due to a kmemleak error,
> >> The user will be informed, and then he/she can reclaim memory with:
> >>
> >> # echo off > /sys/kernel/debug/kmemleak
> >>
> >> v2: use "off" handler instead of "clear" handler to do this, suggested
> >> by Catalin.
> >
> > I think there was a slight misunderstanding. My point was about "echo
> > scan=offa?? before a??echo offa??, they can just be squashed into the
> > same action of the latter.
>
> I'm not sure if I understand correctly, so you want the "off" handler to
> stop the scan thread but it will never free kmemleak objects until the
> user explicitly trigger the "clear" action, right?
Yes. That's just in case someone wants to stop kmemleak but still
investigate some previously reported leaks.
Thanks.
--
Catalin
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-03-27 12:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 4:07 [PATCH v2 1/3] kmemleak: allow freeing internal objects after kmemleak was disabled Li Zefan
2014-03-17 4:08 ` [PATCH v2 2/3] kmemleak: remove redundant code Li Zefan
2014-03-21 23:40 ` Catalin Marinas
2014-03-17 4:09 ` [PATCH v2 3/3] kmemleak: change some global variables to int Li Zefan
2014-03-21 23:44 ` Catalin Marinas
2014-03-21 23:37 ` [PATCH v2 1/3] kmemleak: allow freeing internal objects after kmemleak was disabled Catalin Marinas
2014-03-27 2:29 ` Li Zefan
2014-03-27 12:21 ` Catalin Marinas [this message]
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=20140327122139.GH20298@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.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;
as well as URLs for NNTP newsgroup(s).