diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-03-06 14:09:10 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-04-29 11:43:26 -0400 |
commit | 83ebe63ead0fe60e4b548730800cb68293ce098b (patch) | |
tree | 5194dfb04b557ebeccd9ed6a912f93d3c543c7df /kernel/rcu/tree.c | |
parent | 24342c963a7fc04ec8f199778427943509f0bd5e (diff) |
rcu: Print negatives for stall-warning counter wraparound
The print_other_cpu_stall() and print_cpu_stall() functions print
grace-period numbers using an unsigned format, which means that the number
one less than zero is a very large number. This commit therefore causes
these numbers to be printed with a signed format in order to improve
readability of the RCU CPU stall-warning output.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r-- | kernel/rcu/tree.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 2c53ac924cab..b33c29a99df3 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -932,9 +932,9 @@ static void print_other_cpu_stall(struct rcu_state *rsp) | |||
932 | print_cpu_stall_info_end(); | 932 | print_cpu_stall_info_end(); |
933 | for_each_possible_cpu(cpu) | 933 | for_each_possible_cpu(cpu) |
934 | totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen; | 934 | totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen; |
935 | pr_cont("(detected by %d, t=%ld jiffies, g=%lu, c=%lu, q=%lu)\n", | 935 | pr_cont("(detected by %d, t=%ld jiffies, g=%ld, c=%ld, q=%lu)\n", |
936 | smp_processor_id(), (long)(jiffies - rsp->gp_start), | 936 | smp_processor_id(), (long)(jiffies - rsp->gp_start), |
937 | rsp->gpnum, rsp->completed, totqlen); | 937 | (long)rsp->gpnum, (long)rsp->completed, totqlen); |
938 | if (ndetected == 0) | 938 | if (ndetected == 0) |
939 | pr_err("INFO: Stall ended before state dump start\n"); | 939 | pr_err("INFO: Stall ended before state dump start\n"); |
940 | else if (!trigger_all_cpu_backtrace()) | 940 | else if (!trigger_all_cpu_backtrace()) |
@@ -971,8 +971,9 @@ static void print_cpu_stall(struct rcu_state *rsp) | |||
971 | print_cpu_stall_info_end(); | 971 | print_cpu_stall_info_end(); |
972 | for_each_possible_cpu(cpu) | 972 | for_each_possible_cpu(cpu) |
973 | totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen; | 973 | totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen; |
974 | pr_cont(" (t=%lu jiffies g=%lu c=%lu q=%lu)\n", | 974 | pr_cont(" (t=%lu jiffies g=%ld c=%ld q=%lu)\n", |
975 | jiffies - rsp->gp_start, rsp->gpnum, rsp->completed, totqlen); | 975 | jiffies - rsp->gp_start, |
976 | (long)rsp->gpnum, (long)rsp->completed, totqlen); | ||
976 | if (!trigger_all_cpu_backtrace()) | 977 | if (!trigger_all_cpu_backtrace()) |
977 | dump_stack(); | 978 | dump_stack(); |
978 | 979 | ||