diff options
| author | Joe Perches <joe@perches.com> | 2018-05-14 16:27:33 -0400 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-07-12 18:39:13 -0400 |
| commit | a7538352da722fae5cc95ae6656ea2013f5b8b21 (patch) | |
| tree | 161fb7ff7cdef3b28edeb0a2149bf13322bfc025 /kernel | |
| parent | 1445e9175bead409bb9930f3c745246a09f22cf6 (diff) | |
rcu: Use pr_fmt to prefix "rcu: " to logging output
This commit also adjusts some whitespace while in the area.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Revert string-breaking %s as requested by Andy Shevchenko. ]
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/rcu/rcuperf.c | 7 | ||||
| -rw-r--r-- | kernel/rcu/rcutorture.c | 4 | ||||
| -rw-r--r-- | kernel/rcu/srcutree.c | 5 | ||||
| -rw-r--r-- | kernel/rcu/tree.c | 8 | ||||
| -rw-r--r-- | kernel/rcu/tree_plugin.h | 10 |
5 files changed, 20 insertions, 14 deletions
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c index b080bc4a4f45..00e395c0d7d0 100644 --- a/kernel/rcu/rcuperf.c +++ b/kernel/rcu/rcuperf.c | |||
| @@ -680,12 +680,11 @@ rcu_perf_init(void) | |||
| 680 | break; | 680 | break; |
| 681 | } | 681 | } |
| 682 | if (i == ARRAY_SIZE(perf_ops)) { | 682 | if (i == ARRAY_SIZE(perf_ops)) { |
| 683 | pr_alert("rcu-perf: invalid perf type: \"%s\"\n", | 683 | pr_alert("rcu-perf: invalid perf type: \"%s\"\n", perf_type); |
| 684 | perf_type); | ||
| 685 | pr_alert("rcu-perf types:"); | 684 | pr_alert("rcu-perf types:"); |
| 686 | for (i = 0; i < ARRAY_SIZE(perf_ops); i++) | 685 | for (i = 0; i < ARRAY_SIZE(perf_ops); i++) |
| 687 | pr_alert(" %s", perf_ops[i]->name); | 686 | pr_cont(" %s", perf_ops[i]->name); |
| 688 | pr_alert("\n"); | 687 | pr_cont("\n"); |
| 689 | firsterr = -EINVAL; | 688 | firsterr = -EINVAL; |
| 690 | goto unwind; | 689 | goto unwind; |
| 691 | } | 690 | } |
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 0481c7286875..90a94fecdd73 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c | |||
| @@ -1755,8 +1755,8 @@ rcu_torture_init(void) | |||
| 1755 | torture_type); | 1755 | torture_type); |
| 1756 | pr_alert("rcu-torture types:"); | 1756 | pr_alert("rcu-torture types:"); |
| 1757 | for (i = 0; i < ARRAY_SIZE(torture_ops); i++) | 1757 | for (i = 0; i < ARRAY_SIZE(torture_ops); i++) |
| 1758 | pr_alert(" %s", torture_ops[i]->name); | 1758 | pr_cont(" %s", torture_ops[i]->name); |
| 1759 | pr_alert("\n"); | 1759 | pr_cont("\n"); |
| 1760 | firsterr = -EINVAL; | 1760 | firsterr = -EINVAL; |
| 1761 | goto unwind; | 1761 | goto unwind; |
| 1762 | } | 1762 | } |
diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c index d6d6ea9738c0..e526b56998af 100644 --- a/kernel/rcu/srcutree.c +++ b/kernel/rcu/srcutree.c | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | * | 26 | * |
| 27 | */ | 27 | */ |
| 28 | 28 | ||
| 29 | #define pr_fmt(fmt) "rcu: " fmt | ||
| 30 | |||
| 29 | #include <linux/export.h> | 31 | #include <linux/export.h> |
| 30 | #include <linux/mutex.h> | 32 | #include <linux/mutex.h> |
| 31 | #include <linux/percpu.h> | 33 | #include <linux/percpu.h> |
| @@ -390,7 +392,8 @@ void _cleanup_srcu_struct(struct srcu_struct *sp, bool quiesced) | |||
| 390 | } | 392 | } |
| 391 | if (WARN_ON(rcu_seq_state(READ_ONCE(sp->srcu_gp_seq)) != SRCU_STATE_IDLE) || | 393 | if (WARN_ON(rcu_seq_state(READ_ONCE(sp->srcu_gp_seq)) != SRCU_STATE_IDLE) || |
| 392 | WARN_ON(srcu_readers_active(sp))) { | 394 | WARN_ON(srcu_readers_active(sp))) { |
| 393 | pr_info("%s: Active srcu_struct %p state: %d\n", __func__, sp, rcu_seq_state(READ_ONCE(sp->srcu_gp_seq))); | 395 | pr_info("%s: Active srcu_struct %p state: %d\n", |
| 396 | __func__, sp, rcu_seq_state(READ_ONCE(sp->srcu_gp_seq))); | ||
| 394 | return; /* Caller forgot to stop doing call_srcu()? */ | 397 | return; /* Caller forgot to stop doing call_srcu()? */ |
| 395 | } | 398 | } |
| 396 | free_percpu(sp->sda); | 399 | free_percpu(sp->sda); |
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 19beabe73629..6f2922168216 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -27,6 +27,9 @@ | |||
| 27 | * For detailed explanation of Read-Copy Update mechanism see - | 27 | * For detailed explanation of Read-Copy Update mechanism see - |
| 28 | * Documentation/RCU | 28 | * Documentation/RCU |
| 29 | */ | 29 | */ |
| 30 | |||
| 31 | #define pr_fmt(fmt) "rcu: " fmt | ||
| 32 | |||
| 30 | #include <linux/types.h> | 33 | #include <linux/types.h> |
| 31 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
| 32 | #include <linux/init.h> | 35 | #include <linux/init.h> |
| @@ -1374,8 +1377,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp, unsigned long gp_seq) | |||
| 1374 | * See Documentation/RCU/stallwarn.txt for info on how to debug | 1377 | * See Documentation/RCU/stallwarn.txt for info on how to debug |
| 1375 | * RCU CPU stall warnings. | 1378 | * RCU CPU stall warnings. |
| 1376 | */ | 1379 | */ |
| 1377 | pr_err("INFO: %s detected stalls on CPUs/tasks:", | 1380 | pr_err("INFO: %s detected stalls on CPUs/tasks:", rsp->name); |
| 1378 | rsp->name); | ||
| 1379 | print_cpu_stall_info_begin(); | 1381 | print_cpu_stall_info_begin(); |
| 1380 | rcu_for_each_leaf_node(rsp, rnp) { | 1382 | rcu_for_each_leaf_node(rsp, rnp) { |
| 1381 | raw_spin_lock_irqsave_rcu_node(rnp, flags); | 1383 | raw_spin_lock_irqsave_rcu_node(rnp, flags); |
| @@ -4048,7 +4050,7 @@ static void __init rcu_init_geometry(void) | |||
| 4048 | if (rcu_fanout_leaf == RCU_FANOUT_LEAF && | 4050 | if (rcu_fanout_leaf == RCU_FANOUT_LEAF && |
| 4049 | nr_cpu_ids == NR_CPUS) | 4051 | nr_cpu_ids == NR_CPUS) |
| 4050 | return; | 4052 | return; |
| 4051 | pr_info("RCU: Adjusting geometry for rcu_fanout_leaf=%d, nr_cpu_ids=%u\n", | 4053 | pr_info("Adjusting geometry for rcu_fanout_leaf=%d, nr_cpu_ids=%u\n", |
| 4052 | rcu_fanout_leaf, nr_cpu_ids); | 4054 | rcu_fanout_leaf, nr_cpu_ids); |
| 4053 | 4055 | ||
| 4054 | /* | 4056 | /* |
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 54a251640f53..dbfe90191e19 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
| @@ -74,8 +74,8 @@ static void __init rcu_bootup_announce_oddness(void) | |||
| 74 | pr_info("\tRCU event tracing is enabled.\n"); | 74 | pr_info("\tRCU event tracing is enabled.\n"); |
| 75 | if ((IS_ENABLED(CONFIG_64BIT) && RCU_FANOUT != 64) || | 75 | if ((IS_ENABLED(CONFIG_64BIT) && RCU_FANOUT != 64) || |
| 76 | (!IS_ENABLED(CONFIG_64BIT) && RCU_FANOUT != 32)) | 76 | (!IS_ENABLED(CONFIG_64BIT) && RCU_FANOUT != 32)) |
| 77 | pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d\n", | 77 | pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d.\n", |
| 78 | RCU_FANOUT); | 78 | RCU_FANOUT); |
| 79 | if (rcu_fanout_exact) | 79 | if (rcu_fanout_exact) |
| 80 | pr_info("\tHierarchical RCU autobalancing is disabled.\n"); | 80 | pr_info("\tHierarchical RCU autobalancing is disabled.\n"); |
| 81 | if (IS_ENABLED(CONFIG_RCU_FAST_NO_HZ)) | 81 | if (IS_ENABLED(CONFIG_RCU_FAST_NO_HZ)) |
| @@ -88,11 +88,13 @@ static void __init rcu_bootup_announce_oddness(void) | |||
| 88 | pr_info("\tBuild-time adjustment of leaf fanout to %d.\n", | 88 | pr_info("\tBuild-time adjustment of leaf fanout to %d.\n", |
| 89 | RCU_FANOUT_LEAF); | 89 | RCU_FANOUT_LEAF); |
| 90 | if (rcu_fanout_leaf != RCU_FANOUT_LEAF) | 90 | if (rcu_fanout_leaf != RCU_FANOUT_LEAF) |
| 91 | pr_info("\tBoot-time adjustment of leaf fanout to %d.\n", rcu_fanout_leaf); | 91 | pr_info("\tBoot-time adjustment of leaf fanout to %d.\n", |
| 92 | rcu_fanout_leaf); | ||
| 92 | if (nr_cpu_ids != NR_CPUS) | 93 | if (nr_cpu_ids != NR_CPUS) |
| 93 | pr_info("\tRCU restricting CPUs from NR_CPUS=%d to nr_cpu_ids=%u.\n", NR_CPUS, nr_cpu_ids); | 94 | pr_info("\tRCU restricting CPUs from NR_CPUS=%d to nr_cpu_ids=%u.\n", NR_CPUS, nr_cpu_ids); |
| 94 | #ifdef CONFIG_RCU_BOOST | 95 | #ifdef CONFIG_RCU_BOOST |
| 95 | pr_info("\tRCU priority boosting: priority %d delay %d ms.\n", kthread_prio, CONFIG_RCU_BOOST_DELAY); | 96 | pr_info("\tRCU priority boosting: priority %d delay %d ms.\n", |
| 97 | kthread_prio, CONFIG_RCU_BOOST_DELAY); | ||
| 96 | #endif | 98 | #endif |
| 97 | if (blimit != DEFAULT_RCU_BLIMIT) | 99 | if (blimit != DEFAULT_RCU_BLIMIT) |
| 98 | pr_info("\tBoot-time adjustment of callback invocation limit to %ld.\n", blimit); | 100 | pr_info("\tBoot-time adjustment of callback invocation limit to %ld.\n", blimit); |
