Re: [PATCHv3 00/50] Add log level to show_stack()

From: Dmitry Safonov
Date: Thu Apr 23 2020 - 12:10:31 EST


Hi Tetsuo,

On 4/23/20 4:48 PM, Tetsuo Handa wrote:
> On 2020/04/19 5:18, Dmitry Safonov wrote:
>> Add log level argument to show_stack().
>> Done in three stages:
>> 1. Introducing show_stack_loglvl() for every architecture
>> 2. Migrating old users with an explicit log level
>> 3. Renaming show_stack_loglvl() into show_stack()
>
> Thank you for proposing this patchset.
>
> Every architecture gets show_stack_loglvl() means that it will become
> possible to implement dump_stack_loglvl(const char *loglvl), isn't it?

Yes, it should be quite trivial.

Currently I'm waiting if there will be any noise from linux-next, then I
plan to add dump_stack_loglvl(), also sched_show_task_lvl() and
show_trace().

> I'm about to start a proposal for making it possible to suppress printing majority of
> OOM-killer messages and memory allocation failure messages to consoles
> ( https://lkml.kernel.org/r/efc649fc-f838-97ea-44a2-882f068d033c@xxxxxxxxxxxxxxxxxxx ), for
> dump_stack() / show_mem() / dump_tasks() etc. can take long time (if printed to consoles) is
> an unhappy thing for OOM context and atomic context.

Sounds good - especially for slow consoles.
One can use sysrq to print OOM info.

Thanks,
Dmitry