mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
To: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>,
	"dave@stgolabs.net" <dave@stgolabs.net>,
	"paulmck@kernel.org" <paulmck@kernel.org>,
	"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>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] refscale: always log the error message
Date: Mon, 25 Oct 2021 06:12:40 +0000	[thread overview]
Message-ID: <5f4c53e4-34aa-98f6-343f-0de18df830f2@fujitsu.com> (raw)
In-Reply-To: <20211025032658.22889-3-lizhijian@cn.fujitsu.com>



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.



>   		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;
>   	}

  reply	other threads:[~2021-10-25  6:12 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 [this message]
2021-10-26 14:06     ` Paul E. McKenney
2021-10-27  5:18       ` lizhijian
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=5f4c53e4-34aa-98f6-343f-0de18df830f2@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®