linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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: Fri, 21 Mar 2014 23:37:03 +0000	[thread overview]
Message-ID: <F7314A69-24BE-42B9-8E99-8F9292B397C4@arm.com> (raw)
In-Reply-To: <5326750E.1000004@huawei.com>

Hi Li,

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=off” before “echo off”, they can just be squashed into the
same action of the latter.

I would keep the “clear” part separately as per your first patch. I
recall people asked in the past to still be able to analyse the reports
even though kmemleak failed or was disabled.

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>

  parent reply	other threads:[~2014-03-21 23:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17  4:07 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 ` Catalin Marinas [this message]
2014-03-27  2:29   ` [PATCH v2 1/3] kmemleak: allow freeing internal objects after kmemleak was disabled Li Zefan
2014-03-27 12:21     ` Catalin Marinas

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=F7314A69-24BE-42B9-8E99-8F9292B397C4@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