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 1/3] kmemleak: allow freeing internal objects after disabling kmemleak
Date: Thu, 13 Mar 2014 12:14:59 +0000	[thread overview]
Message-ID: <20140313121459.GJ30339@arm.com> (raw)
In-Reply-To: <53215492.40701@huawei.com>

On Thu, Mar 13, 2014 at 06:47:46AM +0000, Li Zefan wrote:
> +Freeing kmemleak internal objects
> +---------------------------------
> +
> +To allow access to previosuly found memory leaks even when an error fatal
> +to kmemleak happens, internal kmemleak objects won't be freed when kmemleak
> +is disabled, and those objects may occupy a large part of physical
> +memory.
> +
> +If you want to make sure they're freed before disabling kmemleak:
> +
> +  # echo scan=off > /sys/kernel/debug/kmemleak
> +  # echo off > /sys/kernel/debug/kmemleak

I would actually change the code to do a stop_scan_thread() as part of
the "off" handling so that scan=off is not required (we can't put it as
part of the kmemleak_disable because we need scan_mutex held).

-- 
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-13 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  6:47 [PATCH 1/3] kmemleak: allow freeing internal objects after disabling kmemleak Li Zefan
2014-03-13  6:48 ` [PATCH 2/3] kmemleak: remove redundant code Li Zefan
2014-03-13  6:48 ` [PATCH 3/3] kmemleak: change some global variables to int Li Zefan
2014-03-13 12:14 ` Catalin Marinas [this message]
2014-03-17  3:13   ` [PATCH 1/3] kmemleak: allow freeing internal objects after disabling kmemleak Li Zefan

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=20140313121459.GJ30339@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).