Skip to content

Commit

Permalink
rcuscale: Always log error message
Browse files Browse the repository at this point in the history
Unconditionally log messages corresponding to errors.

Acked-by: Davidlohr Bueso <[email protected]>
Signed-off-by: Li Zhijian <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
zhijianli88 authored and paulmckrcu committed Dec 8, 2021
1 parent 04cf851 commit 86e7ed1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions kernel/rcu/rcuscale.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ MODULE_AUTHOR("Paul E. McKenney <[email protected]>");
pr_alert("%s" SCALE_FLAG " %s\n", scale_type, s)
#define VERBOSE_SCALEOUT_STRING(s) \
do { if (verbose) pr_alert("%s" SCALE_FLAG " %s\n", scale_type, s); } while (0)
#define VERBOSE_SCALEOUT_ERRSTRING(s) \
do { if (verbose) pr_alert("%s" SCALE_FLAG "!!! %s\n", scale_type, s); } while (0)
#define SCALEOUT_ERRSTRING(s) \
pr_alert("%s" SCALE_FLAG "!!! %s\n", scale_type, s)

/*
* The intended use cases for the nreaders and nwriters module parameters
Expand Down Expand Up @@ -514,11 +514,11 @@ rcu_scale_cleanup(void)
* during the mid-boot phase, so have to wait till the end.
*/
if (rcu_gp_is_expedited() && !rcu_gp_is_normal() && !gp_exp)
VERBOSE_SCALEOUT_ERRSTRING("All grace periods expedited, no normal ones to measure!");
SCALEOUT_ERRSTRING("All grace periods expedited, no normal ones to measure!");
if (rcu_gp_is_normal() && gp_exp)
VERBOSE_SCALEOUT_ERRSTRING("All grace periods normal, no expedited ones to measure!");
SCALEOUT_ERRSTRING("All grace periods normal, no expedited ones to measure!");
if (gp_exp && gp_async)
VERBOSE_SCALEOUT_ERRSTRING("No expedited async GPs, so went with async!");
SCALEOUT_ERRSTRING("No expedited async GPs, so went with async!");

if (torture_cleanup_begin())
return;
Expand Down Expand Up @@ -845,7 +845,7 @@ rcu_scale_init(void)
reader_tasks = kcalloc(nrealreaders, sizeof(reader_tasks[0]),
GFP_KERNEL);
if (reader_tasks == NULL) {
VERBOSE_SCALEOUT_ERRSTRING("out of memory");
SCALEOUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
Expand All @@ -865,7 +865,7 @@ rcu_scale_init(void)
kcalloc(nrealwriters, sizeof(*writer_n_durations),
GFP_KERNEL);
if (!writer_tasks || !writer_durations || !writer_n_durations) {
VERBOSE_SCALEOUT_ERRSTRING("out of memory");
SCALEOUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
Expand Down

0 comments on commit 86e7ed1

Please sign in to comment.