Linux Documentation
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andrew Murray <amurray@thegoodpenguin.co.uk>,
	Chris Down <chris@chrisdown.name>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-fsdevel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	linux-doc@vger.kernel.org
Subject: [PATCH printk 0/3] Introduce sync mode
Date: Fri, 10 Jul 2026 16:51:50 +0206	[thread overview]
Message-ID: <20260710144609.194487-1-john.ogness@linutronix.de> (raw)

Hi,

As proposed in an LKML thread [0], here is a series to introduce a
new console feature to use synchronous printing. The feature is
activated using the keyword "sync" in the console= command line
argument. For example:

   console=ttyS0,115200,sync

Sync mode is only available for nbcon consoles that provide a
safe write_atomic() callback. Specifying it for other consoles
will have no effect other than a log entry that sync mode is not
supported.

Patch 3/3 shamelessly copied an implementation from Chris Down
to parse and update the console options. (Chris's version of 
find_and_remove_console_option() is here [1]). I slightly extended
the function to support valueless-options.

At some point we may want to add a sysfs interface to toggle sync
mode.

John Ogness

[0] https://lore.kernel.org/lkml/87v7aruub1.fsf@jogness.linutronix.de
[1] https://lore.kernel.org/lkml/77aa59337507e067f3a4ad7e15375893612bcfa3.1763492585.git.chris@chrisdown.name

John Ogness (3):
  printk: Introduce console sync mode
  proc: Add console sync support for /proc/consoles
  printk: Support setting console sync mode via console=

 Documentation/admin-guide/serial-console.rst |   8 ++
 fs/proc/consoles.c                           |   1 +
 include/linux/console.h                      |   2 +
 kernel/printk/console_cmdline.h              |   1 +
 kernel/printk/internal.h                     |   2 +
 kernel/printk/nbcon.c                        |  42 ++++++--
 kernel/printk/printk.c                       | 104 +++++++++++++++++++
 7 files changed, 154 insertions(+), 6 deletions(-)


base-commit: 080d60fffa8e0d285871cde8395438006a9b5b0c
-- 
2.47.3


             reply	other threads:[~2026-07-10 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 14:45 John Ogness [this message]
2026-07-10 14:45 ` [PATCH printk 3/3] printk: Support setting console sync mode via console= John Ogness
2026-07-10 21:05 ` [PATCH printk 0/3] Introduce sync mode John Ogness

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=20260710144609.194487-1-john.ogness@linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=amurray@thegoodpenguin.co.uk \
    --cc=chris@chrisdown.name \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=skhan@linuxfoundation.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