Re: [RFC PATCH 3/3] watchdog: Turn console verbosity on when reporting softlockup

From: Valdis KlÄtnieks
Date: Thu Mar 19 2020 - 03:39:26 EST


On Thu, 19 Mar 2020 15:48:36 +0900, Sergey Senozhatsky said:

> So the issue is that when we bump `console_loglevel' or `ignore_loglevel'
> we lift restrictions globally. For all CPUs, for all contexts which call
> printk(). This may have negative impact. Fuzzing is one example. It
> usually generates a lot of printk() noise, so lifting global printk()
> log_level restrictions does cause problems. I recall that fuzzing people
> really disliked the
> old_level = console_loglevel
> console_loglevel = new_level
> ....
> console_loglevel = old_level
>
> approach. Because if lets all CPUs and tasks to pollute serial logs.
> While what we want is to print messages from a particular CPU/task.

Well... how does this sound for a RFC idea? We already have CONFIG_PRINTK_TIME
and CONFIG_PRINTK_CALLER. How about adding an option to allow printing the
calling CPU as well, or just extend CALLER to print [pid/cpu] rather than just
[pid]?

(And yes, I know that the concept of "this CPU" can change quickly, which is
why per_cpu data may not be accurate for anything more than statistical
aggregation purposes. It's only worth pondering how to deal with that if it's
worth developing the patch at all... :)

Attachment: pgpcat12XqgOd.pgp
Description: PGP signature