linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>,
	Bob Pearson <rpearsonhpe@gmail.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Zhu Yanjun <zyjzyj2000@gmail.com>
Subject: Re: newlines in message macros
Date: Fri, 15 Sep 2023 10:59:49 +0800	[thread overview]
Message-ID: <1c19cdc0-664e-514b-edd0-5cc6f899523b@linux.dev> (raw)
In-Reply-To: <6a6c3491-5288-83ad-4a51-085797b2358c@fujitsu.com>


在 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

      reply	other threads:[~2023-09-15  2:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c19cdc0-664e-514b-edd0-5cc6f899523b@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).