Why printk() is so complicated, and how to fix it
lwn.net
lwn.net
I loved this bit: " By 2.6.26, printk() was causing large latency spikes; kernel developers dealt with this problem by ignoring printk() in the latency tracer, thus sweeping it under the rug."
Evantually figured out it was printk that was causing the crash. Apperantly there are parts of code you cant use printk. It was a lot of fun debugging when each compile takes half an hour
printf doesn't have to deal with any of these issues.
But the userspace "solution" is to just forbid such usage.
which is totally not something the kernel developers want because printk is the one thing that remains even when everything else has gone belly-up.
They need a reliable method to log even under the harshest of circumstances because without a reliable log, how should they be able to ever cause those circumstances to not happen?
They could and perhaps should have just called it "printf", but it doesn't really matter much.