Linux 6.0 To Disable Printing On Consoles With Real-Time Kernels

Written by Michael Larabel in Linux Kernel on 2 August 2022 at 03:00 AM EDT. 19 Comments
LINUX KERNEL
As part of getting PREEMPT_RT support ready to be mainlined at long last for real-time kernel builds, a number of Linux 6.0 (nee 5.20) pull requests have revolved around additional RT preparatory changes. With the printk changes for Linux 6.0, the console drivers will now be skipped in RT mode.

The Linux 6.0 printk pull request from Monday explains:
Completely disable printing on consoles with CONFIG_RT. They break RT guarantees. They are too slow to be called with raw spinlocks. They can't be called with normal spinlocks in an atomic context because RT spinlocks might sleep. It is going to get fixed by the kthreads and atomic consoles. In the meantime, the debugging of CONFIG_RT kernel will be possible only by the user space kernel log readers.

So when doing a Linux kernel build with CONFIG_PREEMPT_RT enabled, the console kernel drivers will be skipped completely. The plan is to overcome this limitation with atomic consoles and printing threads, but for now it will be left up to user-space to retrieve the log buffer.



Update: Linus Torvalds is upset with this change and has decided not to pull it.
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