Skip to content

Commit 3ab955d

Browse files
Zhen Leipaulmckrcu
authored andcommitted
rcu: Align the output of RCU CPU stall warning messages
Time stamps are added to the output in kernels built with CONFIG_PRINTK_TIME=y, which causes misaligned output. Therefore, replace pr_cont() with pr_err(), which fixes alignment and gets rid of a couple of despised pr_cont() calls. Before: [ 37.567343] rcu: INFO: rcu_preempt self-detected stall on CPU [ 37.567839] rcu: 0-....: (1500 ticks this GP) idle=*** [ 37.568270] (t=1501 jiffies g=4717 q=28 ncpus=4) [ 37.568668] CPU: 0 PID: 313 Comm: test0 Not tainted 6.1.0-rc4 #8 After: [ 36.762074] rcu: INFO: rcu_preempt self-detected stall on CPU [ 36.762543] rcu: 0-....: (1499 ticks this GP) idle=*** [ 36.763003] rcu: (t=1500 jiffies g=5097 q=27 ncpus=4) [ 36.763522] CPU: 0 PID: 313 Comm: test0 Not tainted 6.1.0-rc4 #9 Signed-off-by: Zhen Lei <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent be42f00 commit 3ab955d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/rcu/tree_stall.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps)
619619

620620
for_each_possible_cpu(cpu)
621621
totqlen += rcu_get_n_cbs_cpu(cpu);
622-
pr_cont("\t(detected by %d, t=%ld jiffies, g=%ld, q=%lu ncpus=%d)\n",
622+
pr_err("\t(detected by %d, t=%ld jiffies, g=%ld, q=%lu ncpus=%d)\n",
623623
smp_processor_id(), (long)(jiffies - gps),
624624
(long)rcu_seq_current(&rcu_state.gp_seq), totqlen, rcu_state.n_online_cpus);
625625
if (ndetected) {
@@ -680,7 +680,7 @@ static void print_cpu_stall(unsigned long gps)
680680
raw_spin_unlock_irqrestore_rcu_node(rdp->mynode, flags);
681681
for_each_possible_cpu(cpu)
682682
totqlen += rcu_get_n_cbs_cpu(cpu);
683-
pr_cont("\t(t=%lu jiffies g=%ld q=%lu ncpus=%d)\n",
683+
pr_err("\t(t=%lu jiffies g=%ld q=%lu ncpus=%d)\n",
684684
jiffies - gps,
685685
(long)rcu_seq_current(&rcu_state.gp_seq), totqlen, rcu_state.n_online_cpus);
686686

0 commit comments

Comments
 (0)