From: Joe Perches <joe@perches.com>
To: Edward Cree <ecree@solarflare.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-btrfs@vger.kernel.org, linux-acpi@vger.kernel.org,
netdev@vger.kernel.org, Jason Baron <jbaron@akamai.com>,
Jonathan Corbet <corbet@lwn.net>,
Jim Cromie <jim.cromie@gmail.com>
Subject: Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask
Date: Tue, 09 Jun 2020 10:56:19 -0700 [thread overview]
Message-ID: <2b291c34e10b3b3d9d6e01f8201ec0942e39575f.camel@perches.com> (raw)
In-Reply-To: <727b31a0-543b-3dc5-aa91-0d78dc77df9c@solarflare.com>
On Tue, 2020-06-09 at 18:42 +0100, Edward Cree wrote:
> On 09/06/2020 17:58, Joe Perches wrote:
> > On Tue, 2020-06-09 at 13:16 +0200, Greg Kroah-Hartman wrote:
> > > What is wrong with the existing control of dynamic
> > > debug messages that you want to add another type of arbitrary grouping
> > > to it?
> > There is no existing grouping mechanism.
> >
> > Many drivers and some subsystems used an internal one
> > before dynamic debug.
> >
> > $ git grep "MODULE_PARM.*\bdebug\b"|wc -l
> > 501
> >
> > This is an attempt to unify those homebrew mechanisms.
> In network drivers, this is probablyusing the existing groupings
> defined by netif_level() - see NETIF_MSG_DRV and friends. Note
> that those groups are orthogonal to the level, i.e. they control
> netif_err() etc. as well, not just debug messages.
These are _not_ netif_<level> control flags. Some are though.
For instance:
$ git grep "MODULE_PARM.*\bdebug\b" drivers/net | head -10
drivers/net/ethernet/3com/3c509.c:MODULE_PARM_DESC(debug, "debug level (0-6)");
drivers/net/ethernet/3com/3c515.c:MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
drivers/net/ethernet/3com/3c59x.c:MODULE_PARM_DESC(debug, "3c59x debug level (0-6)");
drivers/net/ethernet/adaptec/starfire.c:MODULE_PARM_DESC(debug, "Debug level (0-6)");
drivers/net/ethernet/allwinner/sun4i-emac.c:MODULE_PARM_DESC(debug, "debug message flags");
drivers/net/ethernet/altera/altera_tse_main.c:MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)");
drivers/net/ethernet/amazon/ena/ena_netdev.c:MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
drivers/net/ethernet/amd/atarilance.c:MODULE_PARM_DESC(lance_debug, "atarilance debug level (0-3)");
drivers/net/ethernet/amd/lance.c:MODULE_PARM_DESC(lance_debug, "LANCE/PCnet debug level (0-7)");
drivers/net/ethernet/amd/pcnet32.c:MODULE_PARM_DESC(debug, DRV_NAME " debug level");
These are all level/class output controls.
> Certainly in the case of sfc, and I'd imagine for many other net
> drivers too, the 'debug' modparam is setting the default for
> net_dev->msg_enable, which can be changed after probe with
> ethtool.
True.
> It doesn't look like the proposed mechanism subsumes that (we have
> rather more than 5 groups, and it's not clear how you'd connect
> it to the existing msg_enable (which uapi must be maintained); if
> you don't have a way to do this, better exclude drivers/net/ from
> your grep|wc because you won't be unifying those - in my tree
> that's 119 hits.
Likely not.
I agree it'd be useful to attach the modparam control flag
to the dynamic debug use somehow.
cheers, Joe
next prev parent reply other threads:[~2020-06-09 17:57 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 10:45 [PATCH v3 0/7] Venus dynamic debug Stanimir Varbanov
2020-06-09 10:45 ` [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask Stanimir Varbanov
2020-06-09 11:09 ` Matthew Wilcox
2020-06-09 11:16 ` Greg Kroah-Hartman
2020-06-09 16:58 ` Joe Perches
2020-06-09 17:42 ` Edward Cree
2020-06-09 17:56 ` Joe Perches [this message]
2020-06-09 18:08 ` Edward Cree
2020-06-10 6:31 ` Greg Kroah-Hartman
2020-06-10 6:35 ` Joe Perches
2020-06-10 7:09 ` Greg Kroah-Hartman
2020-06-10 7:24 ` Joe Perches
2020-06-10 10:29 ` Stanimir Varbanov
2020-06-10 12:26 ` Greg Kroah-Hartman
2020-06-09 10:45 ` [PATCH v3 2/7] dynamic_debug: Group debug messages by " Stanimir Varbanov
2020-06-09 12:27 ` Petr Mladek
2020-06-09 10:46 ` [PATCH v3 3/7] dev_printk: Add dev_dbg_level macro over dynamic one Stanimir Varbanov
2020-06-09 10:46 ` [PATCH v3 4/7] printk: Add pr_debug_level " Stanimir Varbanov
2020-06-09 11:12 ` Greg Kroah-Hartman
2020-06-09 10:46 ` [PATCH v3 5/7] venus: Add debugfs interface to set firmware log level Stanimir Varbanov
2020-06-09 11:12 ` Greg Kroah-Hartman
2020-06-11 11:51 ` Stanimir Varbanov
2020-06-09 10:46 ` [PATCH v3 6/7] venus: Make debug infrastructure more flexible Stanimir Varbanov
2020-06-09 11:14 ` Greg Kroah-Hartman
2020-06-10 13:29 ` Stanimir Varbanov
2020-06-10 13:37 ` Greg Kroah-Hartman
2020-06-10 19:49 ` Joe Perches
2020-06-10 20:23 ` Joe Perches
2020-06-11 6:26 ` Greg Kroah-Hartman
2020-06-11 6:42 ` Joe Perches
2020-06-11 10:52 ` Daniel Thompson
2020-06-11 11:31 ` Stanimir Varbanov
2020-06-11 12:18 ` Daniel Thompson
2020-06-11 21:19 ` jim.cromie
2020-06-11 21:59 ` Jason Baron
2020-06-11 22:33 ` Joe Perches
2020-06-12 0:08 ` jim.cromie
2020-06-10 18:32 ` WIP generic module->debug_flags and dynamic_debug jim.cromie
2020-06-10 20:24 ` Joe Perches
2020-06-11 11:26 ` Rasmus Villemoes
2020-06-11 14:09 ` jim.cromie
2020-06-09 10:46 ` [PATCH v3 7/7] venus: Add a debugfs file for SSR trigger Stanimir Varbanov
2020-06-09 11:13 ` [PATCH v3 0/7] Venus dynamic debug Matthew Wilcox
2020-06-09 16:03 ` Randy Dunlap
2020-06-09 16:49 ` Joe Perches
2020-06-09 21:21 ` jim.cromie
2020-06-09 22:23 ` Joe Perches
2020-06-10 1:58 ` Joe Perches
2020-06-10 3:10 ` jim.cromie
2020-06-09 16:40 ` Joe Perches
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=2b291c34e10b3b3d9d6e01f8201ec0942e39575f.camel@perches.com \
--to=joe@perches.com \
--cc=corbet@lwn.net \
--cc=ecree@solarflare.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbaron@akamai.com \
--cc=jim.cromie@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stanimir.varbanov@linaro.org \
/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).