Re: [PATCH v2 1/2] RDMA/rxe: Improve newline in printing messages

From: John Ogness
Date: Mon Aug 28 2023 - 06:53:17 EST


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