linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCHv2] kmemleak: Add option to print warnings to dmesg
Date: Fri, 31 Aug 2018 15:56:13 +0100	[thread overview]
Message-ID: <20180831145613.6cxtk3j5m4amxtoh@armageddon.cambridge.arm.com> (raw)
In-Reply-To: <20180830074327.ivjq6g25lw7kpz2l@axis.com>

On Thu, Aug 30, 2018 at 09:43:27AM +0200, Vincent Whitchurch wrote:
> On Tue, Aug 28, 2018 at 11:26:22AM +0100, Catalin Marinas wrote:
> > On Tue, Aug 28, 2018 at 12:14:12PM +0200, Vincent Whitchurch wrote:
> > > On Mon, Aug 27, 2018 at 03:16:41PM -0700, Andrew Morton wrote:
> > > > On Mon, 27 Aug 2018 10:38:21 +0200 Vincent Whitchurch <vincent.whitchurch@axis.com> wrote:
> > > > > +config DEBUG_KMEMLEAK_WARN
> > > > > +	bool "Print kmemleak object warnings to log buffer"
> > > > > +	depends on DEBUG_KMEMLEAK
> > > > > +	help
> > > > > +	  Say Y here to make kmemleak print information about unreferenced
> > > > > +	  objects (including stacktraces) as warnings to the kernel log buffer.
> > > > > +	  Otherwise this information is only available by reading the kmemleak
> > > > > +	  debugfs file.
> > > > 
> > > > Why add the config option?  Why not simply make the change for all
> > > > configs?
> > > 
> > > No particular reason other than preserving the current behaviour for
> > > existing users.  I can remove the config option if Catalin is fine with
> > > it.
> > 
> > IIRC, in the early kmemleak days, people complained about it being to
> > noisy (the false positives rate was also much higher), so the default
> > behaviour was changed to monitor (almost) quietly with the details
> > available via debugfs. I'd like to keep this default behaviour but we
> > could have a "verbose" command via both debugfs and kernel parameter (as
> > we do with "off" and "on"). Would this work for you?
> 
> Either a config option or a parameter are usable for me.  How about
> something like this?  It can be enabled with kmemleak.verbose=1 or "echo
> 1 > /sys/module/kmemleak/parameters/verbose":

Works for me (slightly inconsistent with "echo ... >
/sys/kernel/debug/kmemleak" but a module_param seems to work better here
as it's a configuration rather than an action).

-- 
Catalin

      reply	other threads:[~2018-08-31 14:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-27  8:38 [PATCHv2] kmemleak: Add option to print warnings to dmesg Vincent Whitchurch
2018-08-27 22:16 ` Andrew Morton
2018-08-28 10:14   ` Vincent Whitchurch
2018-08-28 10:26     ` Catalin Marinas
2018-08-30  7:43       ` Vincent Whitchurch
2018-08-31 14:56         ` 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=20180831145613.6cxtk3j5m4amxtoh@armageddon.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vincent.whitchurch@axis.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).