public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches•com>
To: Jay Vosburgh <jay.vosburgh@canonical•com>
Cc: Michael J Dilmore <michael.j.dilmore@gmail•com>,
	Veaceslav Falico <vfalico@gmail•com>,
	Andy Gospodarek <andy@greyhouse•net>,
	netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH] Convert multiple netdev_info messages to netdev_dbg
Date: Thu, 15 Jun 2017 19:03:46 -0700	[thread overview]
Message-ID: <1497578626.10546.1.camel@perches.com> (raw)
In-Reply-To: <21519.1497577761@famine>

On Thu, 2017-06-15 at 18:49 -0700, Jay Vosburgh wrote:
> Joe Perches <joe@perches•com> wrote:
> 
> > On Thu, 2017-06-15 at 19:14 +0100, Michael J Dilmore wrote:
> > > Multiple netdev_info messages clutter kernel output. Also add netdev_dbg for packets per slave.
> > 
> > []
> > > diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
> > 
> > []
> > > @@ -9,6 +9,8 @@
> > >   * (at your option) any later version.
> > >   */
> > >   
> > > +#define DEBUG 1
> > 
> > Is defining DEBUG really worthwhile.

Question was really if it's worthwhile to have
that logging always emitted at debug level or if
it's only useful when debugging.

I generally think smaller object code is better
and if it's not necessary, debugging output is
better not enabled/compiled into the kernel.

> 	I don't believe so, since if CONFIG_DYNAMIC_DEBUG is not
> enabled, having #define DEBUG will enable all of the netdev_dbg messages
> unconditionally, which is the opposite of the stated purpose of the
> patch.  If DYNAMIC_DEBUG is enabled, having DEBUG doesn't do anything
> that I can see.

Having #define DEBUG means that by default the
dynamic_debug output logging is enabled in the
control file, otherwise it's not emitted unless
it's specifically enabled by a user.

include/linux/dynamic_debug.h:#ifdef DEBUG
include/linux/dynamic_debug.h-#define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \
include/linux/dynamic_debug.h-  DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_true, \
include/linux/dynamic_debug.h-                                    (STATIC_KEY_TRUE_INIT))

      reply	other threads:[~2017-06-16  2:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 18:14 [PATCH] Convert multiple netdev_info messages to netdev_dbg Michael J Dilmore
2017-06-15 21:54 ` Joe Perches
2017-06-16  1:49   ` Jay Vosburgh
2017-06-16  2:03     ` Joe Perches [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=1497578626.10546.1.camel@perches.com \
    --to=joe@perches$(echo .)com \
    --cc=andy@greyhouse$(echo .)net \
    --cc=jay.vosburgh@canonical$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=michael.j.dilmore@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=vfalico@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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