Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbdFPCDw (ORCPT ); Thu, 15 Jun 2017 22:03:52 -0400 Received: from smtprelay0101.hostedemail.com ([216.40.44.101]:53320 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751641AbdFPCDv (ORCPT ); Thu, 15 Jun 2017 22:03:51 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2691:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4250:4321:5007:7903:7904:10004:10400:10848:11026:11232:11473:11658:11783:11889:11914:12043:12296:12438:12740:12895:13069:13311:13357:13439:13894:14181:14659:14721:21080:21212:21433:21434:21451:21627:30012:30029:30041:30051:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: cloth27_5b78dd59d1e24 X-Filterd-Recvd-Size: 2581 Message-ID: <1497578626.10546.1.camel@perches.com> Subject: Re: [PATCH] Convert multiple netdev_info messages to netdev_dbg From: Joe Perches To: Jay Vosburgh Cc: Michael J Dilmore , Veaceslav Falico , Andy Gospodarek , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 15 Jun 2017 19:03:46 -0700 In-Reply-To: <21519.1497577761@famine> References: <1497550452-3067-1-git-send-email-michael.j.dilmore@gmail.com> <1497563676.14396.19.camel@perches.com> <21519.1497577761@famine> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1594 Lines: 41 On Thu, 2017-06-15 at 18:49 -0700, Jay Vosburgh wrote: > Joe Perches 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))