Linux 6.3 printk Changes Prepare For Threaded/Atomic Consoles

Written by Michael Larabel in Linux Kernel on 21 February 2023 at 11:00 AM EST. 21 Comments
LINUX KERNEL
Sent out today for the Linux 6.3 kernel merge window are the updates to the printk code. Notable this time around are preparations to printk in working toward threaded/atomic consoles support. That threaded/atomic consoles support is all the more important as it's the last piece of the puzzle before the remainder of the real-time (PREEMPT_RT) patches can be upstreamed into the Linux kernel.

Linux's current console printing is not compatible with the real-time kernel mode but to address that in the works for several months has been threaded/atomic console support, which then opens the door for the rest of the PREEMPT_RT patches to be fully mainlined.

The printk code for Linux 6.3 only includes a refactoring of the printk code in preparation for introducing atomic consoles that cannot share the global buffers. For Linux 6.3 though that atomic/threaded console support isn't ready. The new printk code makes use of two new lockless functions for reading and formatting of printk messages to the console. The new functions can be used from any context and set the stage for introducing threaded/atomic consoles hopefully in the near term.

The updates for printk in Linux 6.3 are laid out via this kernel pull request.

At the moment the current linux-rt-patches against Linux 6.2 upstream is just over 50 patches needing to be applied for the real-time kernel support.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week