From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
To: "paulmck@kernel.org" <paulmck@kernel.org>
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>
Subject: Re: [PATCH 3/3] refscale: always log the error message
Date: Wed, 27 Oct 2021 05:18:18 +0000 [thread overview]
Message-ID: <0c9868b6-a143-b098-aa0d-bf525f32ed8c@fujitsu.com> (raw)
In-Reply-To: <20211026140632.GV880162@paulmck-ThinkPad-P17-Gen-1>
On 26/10/2021 22:06, Paul E. McKenney wrote:
> On Mon, Oct 25, 2021 at 06:12:40AM +0000, lizhijian@fujitsu.com wrote:
>>
>> On 25/10/2021 11:26, Li Zhijian wrote:
>>> Generally, error message should be logged anyhow.
>>>
>>> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
>>> ---
>>> kernel/rcu/refscale.c | 8 ++++----
>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
>>> index a4479f00dcdc..f055d168365a 100644
>>> --- a/kernel/rcu/refscale.c
>>> +++ b/kernel/rcu/refscale.c
>>> @@ -58,8 +58,8 @@ do { \
>>> } \
>>> } while (0)
>>>
>>> -#define VERBOSE_SCALEOUT_ERRSTRING(s, x...) \
>>> - do { if (verbose) pr_alert("%s" SCALE_FLAG "!!! " s, scale_type, ## x); } while (0)
>>> +#define SCALEOUT_ERRSTRING(s, x...) \
>>> + do { pr_alert("%s" SCALE_FLAG "!!! " s, scale_type, ## x); } while (0)
>>>
>>> MODULE_LICENSE("GPL");
>>> MODULE_AUTHOR("Joel Fernandes (Google) <joel@joelfernandes.org>");
>>> @@ -651,7 +651,7 @@ static int main_func(void *arg)
>>> result_avg = kzalloc(nruns * sizeof(*result_avg), GFP_KERNEL);
>>> buf = kzalloc(800 + 64, GFP_KERNEL);
>>> if (!result_avg || !buf) {
>>> - VERBOSE_SCALEOUT_ERRSTRING("out of memory");
>>> + SCALEOUT_ERRSTRING("out of memory");
>> '\n' should be added to the last to flush it.
> And there might well be other missing "\n" instances in similar messages
> in rcuscale.c, rcutorture.c, scftorture.c, locktorture.c, and torture.c.
> Please feel free to send a patch for each file needing this help.
Sure, i will do that.
Thanks
Zhijian
> I queued your other three patches for v5.17 (not this coming merge window,
> but the one after that), thank you! I did wordsmith the commit logs,
> so please check to see if I messed anything up.
>
> Thanx, Paul
>
>>> goto oom_exit;
>>> }
>>> if (holdoff)
>>> @@ -837,7 +837,7 @@ ref_scale_init(void)
>>> reader_tasks = kcalloc(nreaders, sizeof(reader_tasks[0]),
>>> GFP_KERNEL);
>>> if (!reader_tasks) {
>>> - VERBOSE_SCALEOUT_ERRSTRING("out of memory");
>>> + SCALEOUT_ERRSTRING("out of memory");
>> ditto
>>
>> Thanks
>> Zhijian
>>> firsterr = -ENOMEM;
>>> goto unwind;
>>> }
next prev parent reply other threads:[~2021-10-27 5:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 3:26 [PATCH 1/3] refscale: simplify the errexit checkpoint Li Zhijian
2021-10-25 3:26 ` [PATCH 2/3] refscale: prevent buffer to pr_alert() being too long Li Zhijian
2021-10-25 3:26 ` [PATCH 3/3] refscale: always log the error message Li Zhijian
2021-10-25 6:12 ` lizhijian
2021-10-26 14:06 ` Paul E. McKenney
2021-10-27 5:18 ` lizhijian [this message]
2021-10-27 7:21 ` lizhijian
2021-10-28 13:30 ` Paul E. McKenney
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=0c9868b6-a143-b098-aa0d-bf525f32ed8c@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=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--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
all inboxes | Powered by JetHome®