[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <844j56v75z.fsf@jogness.linutronix.de>
Date: Sun, 20 Oct 2024 22:47:28 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Ryo Takakura <ryotkkr98@...il.com>, mpe@...erman.id.au,
npiggin@...il.com, christophe.leroy@...roup.eu, naveen@...nel.org,
maddy@...ux.ibm.com, sourabhjain@...ux.ibm.com, hbathini@...ux.ibm.com,
leobras.c@...il.com, pmladek@...e.com
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org, Ryo
Takakura <ryotkkr98@...il.com>
Subject: Re: [PATCH] powerpc/crash: Allow direct printing on kexec
Hi Ryo,
On 2024-10-20, Ryo Takakura <ryotkkr98@...il.com> wrote:
> Let legacy consoles print directly so that we can see messages on kexec, as
> the commit b6cf8b3f3312 ("printk: add lockless ringbuffer") turned printk
> ring buffer lockless and there should be no worries panicked CPU
> deadlocking writing into ringbuffer after shutting down non-panicked CPU.
It is correct that the ringbuffer is now lockless. But the legacy
console drivers are not. Allowing them to print directly in panic can
lead to similar effects that commit af2876b501e4 ("powerpc/crash: Use
NMI context for printk when starting to crash") was working around.
Note that although printk is deferred, it is only the printing that is
deferred. The messages are landing in the ringbuffer immediately. So
they would be available to kdump and crash kernels.
Rather than removing the deferring, it would be better to convert the
console you are using to the new NBCON API. Then it would be able to
print direct and safe during panic. (printk_deferred does not affect
NBCON consoles.) What console driver are you using that you want to see
the messages on?
John Ogness
Powered by blists - more mailing lists