On 8/6/2025 11:34 PM, John Ogness wrote:
printk no longer works like this. There are no special per-CPU buffers. As correctly pointed out by Longman, the proper interface is printk_deferred_enter()/printk_deferred_exit().
With the deferred interface, the printk message is still immediately stored in the printk ringbuffer (which is lockless) and only the console printing itself is deferred.
Hi, I agree that printk_deferred_enter()/printk_deferred_exit() is a better interface, but I noticed that in stable-5.10, the printk safety mode still uses a per-CPU buffer to store messages through the printk_safe_log_store function.
Additionally, the mainline version has already refactored printk, so this issue no longer exists.