linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: 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, Joe Perches <joe@perches.com>,
	Jason Baron <jbaron@akamai.com>, Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask
Date: Wed, 10 Jun 2020 14:26:41 +0200	[thread overview]
Message-ID: <20200610122641.GB1900758@kroah.com> (raw)
In-Reply-To: <0830ba57-d416-4788-351a-6d1b2ca5b7d8@linaro.org>

On Wed, Jun 10, 2020 at 01:29:20PM +0300, Stanimir Varbanov wrote:
> Hi Greg,
> 
> On 6/9/20 2:16 PM, Greg Kroah-Hartman wrote:
> > On Tue, Jun 09, 2020 at 01:45:58PM +0300, Stanimir Varbanov wrote:
> >> This adds description of the level bitmask feature.
> >>
> >> Cc: Jonathan Corbet <corbet@lwn.net> (maintainer:DOCUMENTATION)
> >>
> >> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> >> ---
> >>  Documentation/admin-guide/dynamic-debug-howto.rst | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>
> >> diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentation/admin-guide/dynamic-debug-howto.rst
> >> index 0dc2eb8e44e5..c2b751fc8a17 100644
> >> --- a/Documentation/admin-guide/dynamic-debug-howto.rst
> >> +++ b/Documentation/admin-guide/dynamic-debug-howto.rst
> >> @@ -208,6 +208,12 @@ line
> >>  	line -1605          // the 1605 lines from line 1 to line 1605
> >>  	line 1600-          // all lines from line 1600 to the end of the file
> >>  
> >> +level
> >> +    The given level will be a bitmask ANDed with the level of the each ``pr_debug()``
> >> +    callsite. This will allow to group debug messages and show only those of the
> >> +    same level.  The -p flag takes precedence over the given level. Note that we can
> >> +    have up to five groups of debug messages.
> > 
> > As was pointed out, this isn't a "level", it's some arbitrary type of
> > "grouping".
> 
> Yes, it is grouping of KERN_DEBUG level messages by importance (my
> fault, I put incorrect name).  What is important is driver author
> decision.  Usually when the driver is huge and has a lot of debug
> messages it is not practical to enable all of them to chasing a
> particular bug or issue.  You know that debugging (printk) add delays
> which could hide or rise additional issue(s) which would complicate
> debug and waste time.

That is why it is possible to turn on and off debugging messages on a
function/line basis already.  Why not just use that instead?

> For the Venus driver I have defined three groups of KERN_DEBUG - low,
> medium and high (again the driver author(s) will decide what the
> importance is depending on his past experience).
> 
> There is another point where the debugging is made by person who is not
> familiar with the driver code. In that case he/she cannot enable lines
> or range of lines because he don't know the details. Here the grouping
> by importance could help.

And they will really know what "low/medium/high" are?

Anyway, that makes a bit more sense, but the documentation could use a
lot more in order to describe this type of behavior, and what is
expected by both driver authors, and users of the interface.

thanks,

greg k-h

  reply	other threads:[~2020-06-10 12:26 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
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 [this message]
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=20200610122641.GB1900758@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=corbet@lwn.net \
    --cc=jbaron@akamai.com \
    --cc=joe@perches.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).