Re: [PATCH v1 5/5] driver core: Add fw_devlink.debug command line boolean parameter

From: Andrew Lunn
Date: Tue Sep 14 2021 - 12:44:05 EST


> 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.

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.

Andrew