* newlines in message macros @ 2023-09-13 20:50 Bob Pearson 2023-09-13 21:10 ` Bob Pearson 2023-09-13 23:12 ` Zhu Yanjun 0 siblings, 2 replies; 6+ messages in thread From: Bob Pearson @ 2023-09-13 20:50 UTC (permalink / raw) To: lizhijian@fujitsu.com, linux-rdma@vger.kernel.org, Zhu Yanjun Li, I see that you removed the built-in newlines in the debug macros in rxe.h which is ok by me. But, 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: newlines in message macros 2023-09-13 20:50 newlines in message macros Bob Pearson @ 2023-09-13 21:10 ` Bob Pearson 2023-09-13 23:12 ` Zhu Yanjun 1 sibling, 0 replies; 6+ messages in thread From: Bob Pearson @ 2023-09-13 21:10 UTC (permalink / raw) To: lizhijian@fujitsu.com, linux-rdma@vger.kernel.org, Zhu Yanjun On 9/13/23 15:50, Bob Pearson wrote: > Li, > > I see that you removed the built-in newlines in the debug macros in rxe.h which is ok by me. But, > 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 On closer examination about half the debug messages that should have newlines added don't. About equally easy to fix this mess by reverting the change and/or removing or adding newlines as needed. Which way should we go. Bob ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: newlines in message macros 2023-09-13 20:50 newlines in message macros Bob Pearson 2023-09-13 21:10 ` Bob Pearson @ 2023-09-13 23:12 ` Zhu Yanjun 2023-09-14 12:52 ` Jason Gunthorpe 2023-09-15 1:38 ` Zhijian Li (Fujitsu) 1 sibling, 2 replies; 6+ messages in thread From: Zhu Yanjun @ 2023-09-13 23:12 UTC (permalink / raw) To: Bob Pearson, lizhijian@fujitsu.com, linux-rdma@vger.kernel.org, Zhu Yanjun 在 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. 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: newlines in message macros 2023-09-13 23:12 ` Zhu Yanjun @ 2023-09-14 12:52 ` Jason Gunthorpe 2023-09-15 1:38 ` Zhijian Li (Fujitsu) 1 sibling, 0 replies; 6+ messages in thread From: Jason Gunthorpe @ 2023-09-14 12:52 UTC (permalink / raw) To: Zhu Yanjun Cc: Bob Pearson, lizhijian@fujitsu.com, linux-rdma@vger.kernel.org, Zhu Yanjun On Thu, Sep 14, 2023 at 07:12:04AM +0800, 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. Kernel standard is to have newlines in the format strings. Jason ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: newlines in message macros 2023-09-13 23:12 ` Zhu Yanjun 2023-09-14 12:52 ` Jason Gunthorpe @ 2023-09-15 1:38 ` Zhijian Li (Fujitsu) 2023-09-15 2:59 ` Zhu Yanjun 1 sibling, 1 reply; 6+ messages in thread From: Zhijian Li (Fujitsu) @ 2023-09-15 1:38 UTC (permalink / raw) To: Zhu Yanjun, Bob Pearson, linux-rdma@vger.kernel.org, Zhu Yanjun 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 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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: newlines in message macros 2023-09-15 1:38 ` Zhijian Li (Fujitsu) @ 2023-09-15 2:59 ` Zhu Yanjun 0 siblings, 0 replies; 6+ messages in thread From: Zhu Yanjun @ 2023-09-15 2:59 UTC (permalink / raw) To: Zhijian Li (Fujitsu), Bob Pearson, linux-rdma@vger.kernel.org, Zhu Yanjun 在 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-15 2:59 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-09-13 20:50 newlines in message macros Bob Pearson 2023-09-13 21:10 ` Bob Pearson 2023-09-13 23:12 ` Zhu Yanjun 2023-09-14 12:52 ` Jason Gunthorpe 2023-09-15 1:38 ` Zhijian Li (Fujitsu) 2023-09-15 2:59 ` Zhu Yanjun
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).