Linux is Turning 30 Years Old & Printk Is Still Being Refined
The printk() function dates all the way back to the original Linux kernel release and even with Linux turning thirty years old this week, work on printk is not over.
Back during Linux 5.10 last year a long overdue revamp of printk() began to land and now with Linux 5.13 more of that work is crossing the finish line. In 5.10 the ring-buffer became fully lock-less but still relying on a log buffer lock.
With Linux 5.13, it's now set to stop synchronizing the log buffer readers by this lock. As such, access the kernel log buffer is now considered fully lock-less. There is though still locks used by printk() along with per-CPU temporary buffers but ultimately the goal is to change those in the future.
The fully lock-less kernel log buffer for printk() along with other enhancements were sent in and subsequently merged on Tuesday via this pull request.
More details on the printk modernization work via the former Linux Plumbers Conference (2019) video embedded below by John Ogness.
Back during Linux 5.10 last year a long overdue revamp of printk() began to land and now with Linux 5.13 more of that work is crossing the finish line. In 5.10 the ring-buffer became fully lock-less but still relying on a log buffer lock.
With Linux 5.13, it's now set to stop synchronizing the log buffer readers by this lock. As such, access the kernel log buffer is now considered fully lock-less. There is though still locks used by printk() along with per-CPU temporary buffers but ultimately the goal is to change those in the future.
The fully lock-less kernel log buffer for printk() along with other enhancements were sent in and subsequently merged on Tuesday via this pull request.
More details on the printk modernization work via the former Linux Plumbers Conference (2019) video embedded below by John Ogness.
9 Comments