Netdev List
 help / color / mirror / Atom feed
From: Sam Crossley <samuelcrossley@gmail.com>
To: Thomas Gleixner <tglx@kernel.org>,
	Breno Leitao <leitao@debian.org>,  Petr Mladek <pmladek@suse.com>,
	John Ogness <john.ogness@linutronix.de>,
	 Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	 Paolo Abeni <pabeni@redhat.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	Simon Horman <horms@kernel.org>,
	 Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	 linux-doc@vger.kernel.org,
	Sam Crossley <samuelcrossley@gmail.com>
Subject: [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand
Date: Sat, 24 Oct 2026 16:06:02 -0700	[thread overview]
Message-ID: <20261024-netcons-replay-upstream-v1-0-9613f38496e5@gmail.com> (raw)

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>


             reply	other threads:[~2026-10-24 23:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24 23:06 Sam Crossley [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261024-netcons-replay-upstream-v1-0-9613f38496e5@gmail.com \
    --to=samuelcrossley@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pmladek@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox