Linux 6.0 To Disable Printing On Consoles With Real-Time Kernels
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:
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.
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.
19 Comments