[PATCH 00/50] Add log level to show_stack()
Dmitry Safonov
dima at arista.com
Wed Nov 13 13:41:50 AEDT 2019
On 11/12/19 4:25 AM, Sergey Senozhatsky wrote:
> On (19/11/12 02:40), Dmitry Safonov wrote:
> [..]
>> In my point of view the cost of one-time [mostly build] testing every
>> architecture is cheaper than introducing some new smart code that will
>> live forever.
>
> Well, there may be the need to pass loglevel deeper due to "hey __show_stack()
> on that arch invokes bar(), which invokes foo() and now foo() does printk(),
> but we don't see it". The context which decided to backtaraces decided
> to do so for a reason, probably, so I guess we can look at it as "a special
> error reporting code block".
>
> The proposed patch set passes loglevel via slightly unusual channel -
> via sprintf(). We probably can do it, but I would prefer to minimize
> the number of such printk-s in the kernel. The code snippet which I
> posted also does pretty unusual thing w.r.t loglevel. Both approaches
> are "non-standard" from that POV.
I don't strongly disagree, but if you look at those results:
git grep 'printk("%s.*", \(lvl\|level\)'
it seems to be used in quite a few places.
Thanks,
Dmitry
More information about the Linuxppc-dev
mailing list