Re: newlines in message macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 2023/9/15 9:38, Zhijian Li (Fujitsu) 写道:
Yanjun,

On 14/09/2023 07:12, Zhu Yanjun wrote:
在 2023/9/14 4:50, Bob Pearson 写道:
Li,

I see that you removed the built-in newlines in the debug macros in rxe.h which is ok by me. But,
I made tests for many times about adding newline speeding up flush messages. With or without new line, I can not find out the difference on flushing messages. Not sure if Li Zhijian found this difference in a specific scenario or not.
And even without new line, after output the line, the message still goes to a new line. I suspect if a newline is appended in the PRINTK subsystem.

When i'm using something like: `dmesg --follow` monitor the dmesg, I can notice that delay clearly.
you will see that the timestamp is correct, but the messages don't appear until a next newline.

Thanks. To verify what you said, I made a simple tests. In my test, I output logs with several printk lines without newlines.

From the test result, except the last printk line, the other printk lines can output logs correctly in time.

Perhaps kernel standards add newlines in the format strings. And the last printk without newlines can not output logs in time.

To fix this problem, I add a newline in the last printk line. Then all the printk logs can output correctly in time.

I think your commit and Bob's commit have added newlines in RXE.

Thanks.

Zhu Yanjun


Thanks
Zhijian



Zhu Yanjun

for some reason the rxe_xxx() macros all still have built-in newlines. Why shouldn't we be consistent
and make them all the same. (Maybe they don't get used much or at all.)

Bob



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux