printk() - The Most Useful Tool is Now Showing its Age
summary
printk is the kernel printf that still uses a single fixed-size ring buffer with log levels 1–8 and metadata, and its 1998 spinlock introduced in 1998 plus the later console_lock serializes output and can live-lock one CPU make high‑CPU systems stall when many CPUs emit logs; the codebase evolves (2012 message layout, exclusive_console in 2011) and fixes include per-CPU buffers + irq_work to flush promptly and an NMI-safe path and printk_safe multiplexer that reduce but do not fully eliminate lost or blocking output on panic.
AI-written summary · about
chapters (4)
related talks
52mMinimal Logging Framework in C++20
43mThe Dangers of Being Overly-Paranoid
19mRuntime verification monitors for real-time
46mThe Hidden Secrets of Debugging
01h 01mBack to Basics: Debugging in Cpp
29mUsing strace to troubleshoot issues
14mWhen Sampling Lies: Trustworthy Performance Profiling for Flat Workloads with Blink
26mLightweight Preemptible Functions
