Netdev List
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand
@ 2026-10-24 23:06 Sam Crossley
  2026-10-24 23:06 ` [PATCH RFC 1/2] printk: add per-console replay helper Sam Crossley
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Sam Crossley @ 2026-10-24 23:06 UTC (permalink / raw)
  To: Thomas Gleixner, Breno Leitao, Petr Mladek, John Ogness,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Jonathan Corbet, Paolo Abeni, Randy Dunlap, Sergey Senozhatsky,
	Shuah Khan, Simon Horman, Steven Rostedt
  Cc: linux-kernel, netdev, linux-doc, Sam Crossley

leitao and tglx had discussed this at LPC, sending RFC as suggested
by Breno Leitao.

Netconsole only forwards records while an enabled target and its
transport are available. A target enabled after boot, or one that was
unreachable during a network outage, leaves a gap in the remote log that
cannot currently be recovered.

This adds a write-only "replay" attribute to the netconsole configfs
subsystem that rewinds the netconsole consoles so the retained ring is
re-sent. Patch 1 adds the printk helper; patch 2 is its only caller.

The replay is best effort. console_try_replay() uses console_trylock(),
so unrelated console activity can silently skip the replay.

Testing: verified in a VM and on a physical host (the latter rebased on
a 7.1 kernel) that records emitted before any target was enabled are
re-sent on trigger.

---
Sam Crossley (2):
      printk: add per-console replay helper
      netconsole: add configfs trigger to replay printk buffer

 Documentation/networking/netconsole.rst | 14 ++++++-
 drivers/net/netconsole.c                | 25 ++++++++++++
 include/linux/printk.h                  |  6 +++
 kernel/printk/printk.c                  | 67 ++++++++++++++++++++++++---------
 4 files changed, 94 insertions(+), 18 deletions(-)
---
base-commit: 00513fc3d6c467b1ef3c101a2943cb92de25c49a
change-id: 20260926-netcons-replay-upstream-189eec0b4c79

Best regards,
--  
Sam Crossley <samuelcrossley@gmail.com>


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

end of thread, other threads:[~2026-10-27 17:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24 23:06 [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand Sam Crossley
2026-10-24 23:06 ` [PATCH RFC 1/2] printk: add per-console replay helper Sam Crossley
2026-10-24 23:06 ` [PATCH RFC 2/2] netconsole: add configfs trigger to replay printk buffer Sam Crossley
2026-10-26  9:34 ` [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand John Ogness
2026-10-26 11:44   ` Breno Leitao
2026-10-26 13:09     ` John Ogness
2026-10-26 14:58       ` Petr Mladek
2026-10-26 16:33         ` John Ogness
2026-10-26 17:49           ` Breno Leitao
2026-10-27 13:47             ` Petr Mladek
2026-10-27 15:54               ` Breno Leitao
2026-10-27 17:45                 ` Petr Mladek
2026-10-27 12:58           ` Petr Mladek
2026-10-26 14:39     ` Chris Down
2026-10-26 15:32       ` Breno Leitao

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