linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
To: "paulmck@kernel.org" <paulmck@kernel.org>,
	"lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
Cc: "dave@stgolabs.net" <dave@stgolabs.net>,
	"josh@joshtriplett.org" <josh@joshtriplett.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
	"jiangshanlai@gmail.com" <jiangshanlai@gmail.com>,
	"joel@joelfernandes.org" <joel@joelfernandes.org>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Philip Li <philip.li@intel.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 2/2] refscale: prevent buffer to pr_alert() being too long
Date: Mon, 25 Oct 2021 03:15:19 +0000	[thread overview]
Message-ID: <236085f4-1787-2449-f7ca-cc762da4eca0@fujitsu.com> (raw)
In-Reply-To: <20211024225640.GL880162@paulmck-ThinkPad-P17-Gen-1>



On 25/10/2021 06:56, Paul E. McKenney wrote:
>
>>>>    	if (!buf)
>>>>    		return 0;
>>>>    	buf[0] = 0;
>>>> @@ -617,13 +617,15 @@ static u64 process_durations(int n)
>>>>    		if (i % 5 == 0)
>>>>    			strcat(buf, "\n");
>>>> +		if (strlen(buf) > 800) {
>>>> +			pr_alert("%s", buf);
>>> Does the tools/testing/selftests/rcutorture/bin/kvm-recheck-refscale.sh
>>> script also require changes to handle the partial lines?
Looks it doesn't matter for kvm-recheck-refscale.sh where it will not check these output.


>>>>    		u32 rem;
>>>> @@ -712,9 +711,13 @@ static int main_func(void *arg)
>>>>    		avg = div_u64_rem(result_avg[exp], 1000, &rem);
>>>>    		sprintf(buf1, "%d\t%llu.%03u\n", exp + 1, avg, rem);
>>>>    		strcat(buf, buf1);
>>>> +		if (strlen(buf) > 800) {
>>>> +			pr_alert("%s", buf);
>>>> +			buf[0] = 0;
>>>> +		}
>>>>    	}
>>>> -	SCALEOUT("%s", buf);
>>>> +	pr_alert("%s", buf);
it will not introduce partial lines here, buf  is always ended with '\n'

I have checked the regexp in tools/testing/selftests/rcutorture/bin/kvm-recheck-refscale.sh
and verify it with the new result, it always works.


Thanks
Zhijian



>>>>    err:
>>>>    	// This will shutdown everything including us.
>>>> -- 
>>>> 2.33.0
>>>>
>>>>
>>>>
>>
>

  reply	other threads:[~2021-10-25  3:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 10:51 [PATCH 1/2] refscale: simplify the errexit checkpoint Li Zhijian
2021-10-22 10:51 ` [PATCH 2/2] refscale: prevent buffer to pr_alert() being too long Li Zhijian
2021-10-22 23:15   ` Paul E. McKenney
2021-10-24 14:46     ` Li, Zhijian
2021-10-24 22:56       ` Paul E. McKenney
2021-10-25  3:15         ` lizhijian [this message]
2021-10-22 23:10 ` [PATCH 1/2] refscale: simplify the errexit checkpoint Paul E. McKenney
2021-10-24 13:34   ` Li, Zhijian

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=236085f4-1787-2449-f7ca-cc762da4eca0@fujitsu.com \
    --to=lizhijian@fujitsu.com \
    --cc=dave@stgolabs.net \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=philip.li@intel.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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).