Very helpful. Thanks a lot for your explanation. Zhu Yanjun On Mon, Aug 28, 2023 at 6:51 PM John Ogness <john.ogness@xxxxxxxxxxxxx> wrote: > > On 2023-08-28, Zhu Yanjun <zyjzyj2000@xxxxxxxxx> wrote: > > Do you mean "a newline can help flushing messages out"? > > That is, in printk, the message will be buffered until it is full or > > it meets a newline? > > Correct. A trailing newline is needed for the record to become > "finalized". Only finalized records are pushed out to consoles. > > If there is no trailing newline, the message will be buffered until > printk is called using a message with a trailing newline. > > There are some other reasons why it may be flushed. But for sure the > flushing will be delayed if there is no trailing newline. > > John Ogness