Zack's Kernel News
Zack's Kernel News

Chronicler Zack Brown reports on printk() wrangling, persistent memory as a generalized resource, making Kernel headers available on running systems, and Kernel licensing Hell.
printk() Wrangling
Everyone hates the printk()
function, because it's supposed to do something very simple – print output to the console – but in order to do that it has to overcome tremendous obstacles, like producing its output while the system itself is in the very midst of total destruction. Unlike other functions, printk()
can't rely on any other part of the system actually working. At least, that's the ideal.
John Ogness recently tried to improve matters. Specifically, among other things, he wanted to free printk()
from the constraint of requiring a global lock. He wanted to make it pre-emptible, so that even the deep, dark parts of the kernel that absolutely needed to be able to interrupt everything could still call printk()
in times of crisis.
It's a worthy goal. If those deep, dark parts of the kernel can't use printk()
, then they can't report what went wrong if they were involved in a system crash. Making printk()
pre-emptible would allow every nook and cranny of the kernel to give relevant information that could help to debug the crash.
[...]
Buy this article as PDF
(incl. VAT)