Skip to content

Introduce sync mode

John Ogness linux-doc linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3printk: Introduce console sync modeinclude/linux/console.h kernel/printk/internal.h kernel/printk/nbcon.c +1 more+65 -61 reply
2/3proc: Add console sync support for /proc/consolesfs/proc/consoles.c+1 -01 reply
3/3printk: Support setting console sync mode via console=Documentation/admin-guide/serial-console.rst kernel/printk/console_cmdline.h kernel/printk/printk.c+88 -01 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchChris DownPetr Mladek
1/3
2/3R-b
3/3Co-authored-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH printk 0/3] Introduce sync mode

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/[email protected]
[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

Signature · 1 line
2.47.3