Linux Sees A New Attempt At Threaded Console Printing
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.
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.
16 Comments