Linux Sees A New Attempt At Threaded Console Printing

Written by Michael Larabel in Linux Kernel on 11 September 2022 at 06:13 AM EDT. 16 Comments
LINUX KERNEL
As part of the multi-year effort to overhaul the Linux kernel's printk() code there has been much work in recent months around threaded console printing so each registered console would have a kernel thread and console printing would be decoupled from the printk() callers. That work was aimed for Linux 5.19 but then reverted due to troubles. There is now a new implementation in the works.

That work was reverted during the Linux 5.19 release candidate phase due to missing synchronization between early and regular console functionality and showed other possible problems in the design. Due to printk() being critical for Linux kernel debugging and being a fundamentally important feature, the code was reverted.

Thomas Gleixner with Intel-owned Linutronix has posted a set of 29 patches this weekend under a "request for comments" flag featuring a redesign of the printk() code around the per-console threading.

After working it out with John Ogness who worked on the prior code, these Linutronix engineers hope the new code is in much better shape and more robust.

Beyond the performance reasons, this per-console threaded printing work is also important for finishing up the real-time (RT) work on the Linux kernel after with Linux 6.0 they attempted to just disable console printing for RT kernels but was then rejected by Linus Torvalds.

See this patch series if interested in the threaded printing work and their new approach for hopefully tackling this challenge. Given it's under an "RFC" flag for this important code and the v6.1 merge window is only a few weeks away, it's likely this work will drag on into next year and in turn another cycle at least before the mainlining of the rest of the RT kernel enablement patches.
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