[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84ikoorj53.fsf@jogness.linutronix.de>
Date: Tue, 04 Mar 2025 15:05:52 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Donghyeok Choe <d7271.choe@...sung.com>, linux-kernel@...r.kernel.org,
takakura@...inux.co.jp, youngmin.nam@...sung.com, hajun.sung@...sung.com,
seungh.jung@...sung.com, jh1012.choi@...sung.com
Subject: Re: printk: selective deactivation of feature ignoring non panic
cpu's messages
On 2025-03-04, Petr Mladek <pmladek@...e.com> wrote:
> I mean something like:
>
> --- a/kernel/printk/printk_ringbuffer.c
> +++ b/kernel/printk/printk_ringbuffer.c
> @@ -2143,7 +2143,9 @@ static bool _prb_read_valid(struct printk_ringbuffer *rb, u64 *seq,
> * But it would have the sequence number returned
> * by "prb_next_reserve_seq() - 1".
> */
> - if (this_cpu_in_panic() && ((*seq + 1) < prb_next_reserve_seq(rb)))
> + if (this_cpu_in_panic() &&
> + (!printk_debug_non_panic_cpus || legacy_allow_panic_sync) &&
> + ((*seq + 1) < prb_next_reserve_seq(rb)))
> (*seq)++;
> else
> return false;
Ah, OK. Thanks for the clarification
> OK, I propose the following changes:
>
> + rename the option to "printk_debug_non_panic_cpus"
>
> + do not skip the messages in _prb_read_valid() when this option
> is used before the non-panic CPUs are stopped.
And of course:
+ allow non-panic CPUs in panic to store messages when this option
is set
I would also keep the dump_stack_lvl() implementation as it is, even if
it could lead to interweaving of backtraces. Anyone using
printk_debug_non_panic_cpus should have CONFIG_PRINTK_CALLER enabled.
John
Powered by blists - more mailing lists