lkml.org 
[lkml]   [2021]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 5/5] driver core: Add fw_devlink.debug command line boolean parameter
On Tue, Sep 14, 2021 at 9:52 AM Rob Herring <robh+dt@kernel.org> wrote:
>
> On Tue, Sep 14, 2021 at 11:44 AM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > > I did think of this, but the problem is that dynamic debug logs can
> > > get compiled out (when DYNAMIC_DEBUG isn't set). I think debugging of
> > > fw_devlink needs to be possible without having to recompile the
> > > kernel. So in a sense similar to how initcall_debug works today.
> >
> > My off the shelf Debian kernel has it enabled. Maybe you can check
> > other mainline distributions and see if it is enabled by default.
>
> Right, I would expect users that can't rebuild their kernel easily
> would have it enabled.
>
> > You are also on a slippery path. You argue this is needed all the time
> > and add a custom knob. Somebody else adds a new feature which they
> > also argue always needs bug, and add there own custom knob. We soon
> > have lots of custom knobs, each doing it slightly differently, in
> > different places. Chaos. So you need a really good argument why your
> > code really is special.
> >
> > I would suggest you start with dynamic debug, and collect some
> > statistics of how often you need to ask people to recompile their
> > kernel.
>
> I agree.

Fair enough -- Andrew/Rob.

>
> What would be nice is documenting what needs to be set for devlink.
> What I used was just 'dyndbg="file drivers/base/core.c +p"'

Yeah, I was thinking if we went with dynamic debug I'd have something
I'll copy paste as a reply to any fw_devlink debug email thread.

Where would be a good place to document this?

I was actually thinking of making fw_devlink.debug=1 be an alias for
something like:
dyndbg="func device_link_add +p; func device_links_check_suppliers +p"....

So that people don't have to remember what to copy paste into their
command line as things change.

-Saravana

\
 
 \ /
  Last update: 2021-09-14 19:33    [W:0.056 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site