Linux kernel printk can skip messages?

2019-08-05 13:46发布

问题:

i see that in vprintk_emit kernel puts messages into log_buffer and then print them console_unlock->call_console_driver. But in case if we will put more messages than console (UART) could actually transmitt - what will be the behaviour? I see no blocking primitives near putting messages to log_buffer, so does it mean we will just delete some messages in the beginning of the log_buf to put some new (ring buffer)? So does it mean that printk messages could be lost? I'am talking about kernel 4.1 http://lxr.free-electrons.com/source/kernel/printk/printk.c#L1613