public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] printk: CPU backtrace not printing on panic
@ 2024-08-12  7:21 takakura
  2024-08-12  7:27 ` [PATCH v3 1/2] Allow cpu backtraces to be written into ringbuffer during panic takakura
  2024-08-12  7:29 ` [PATCH v3 2/2] Handle flushing of CPU backtraces " takakura
  0 siblings, 2 replies; 11+ messages in thread
From: takakura @ 2024-08-12  7:21 UTC (permalink / raw)
  To: pmladek, rostedt, john.ogness, senozhatsky, akpm, bhe, lukas,
	wangkefeng.wang, ubizjak, feng.tang, j.granados,
	stephen.s.brennan
  Cc: linux-kernel, nishimura, taka, Ryo Takakura

From: Ryo Takakura <takakura@valinux.co.jp>

Hi! 

This patchset fixes 2 issues on CPU backtrace during panic. The second 
issue was pointed out by John [1].

(1) CPU backtrace triggered during panic has stopped working since the 
commit 779dbc2e78d7 ("printk: Avoid non-panic CPUs writing to ringbuffer") 
as it disabled non-panicked cpus writing into ringbuffer after panic.

(2) The usual(non-panic context) flushing of backtraces written into 
ringbuffer does not work during panic as non-panicked CPUs can't do the 
flushing themselves.

Reviewed-by: John Ogness <john.ogness@linutronix.de>

Sincerely,
Ryo Takakura

---

V1:
[1] https://lore.kernel.org/all/20240729114601.176047-1-takakura@valinux.co.jp/T/

Changes since V2:
[2] https://lore.kernel.org/lkml/20240803081649.224627-1-takakura@valinux.co.jp/T/

- Thanks Petr and John for the feedbacks!
- Add reviewed-by. Petr on (1) and John on the series.
- Fix the order of the patches based on their dependency as suggested by John.
- For (2), instead of using console_flush_on_panic() for flushing backtraces, 
introduce a function which can safely do the flushing in panic while non-panic 
CPU's are still online as suggested by Petr.  Note that the new function calls 
is_printk_legacy_deferred() which is not yet in mainline [3].
[3] https://lore.kernel.org/all/20240804005138.3722656-24-john.ogness@linutronix.de/

---

Ryo Takakura (2):
  (1) Allow cpu backtraces to be written into ringbuffer during panic
  (2) Handle flushing of CPU backtraces during panic

 include/linux/console.h |  1 +
 include/linux/panic.h   |  1 +
 kernel/panic.c          |  9 ++++++++-
 kernel/printk/printk.c  | 16 +++++++++++++++-
 4 files changed, 25 insertions(+), 2 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-08-31  8:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12  7:21 [PATCH v3 0/2] printk: CPU backtrace not printing on panic takakura
2024-08-12  7:27 ` [PATCH v3 1/2] Allow cpu backtraces to be written into ringbuffer during panic takakura
2024-08-13 13:48   ` Petr Mladek
2024-08-15 10:41     ` takakura
2024-08-12  7:29 ` [PATCH v3 2/2] Handle flushing of CPU backtraces " takakura
2024-08-13 13:45   ` Petr Mladek
2024-08-15 10:43     ` takakura
2024-08-19 19:23     ` John Ogness
2024-08-21  5:02       ` takakura
2024-08-26 15:46         ` John Ogness
2024-08-31  8:20           ` takakura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox