diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-09-21 19:35:25 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-10-23 17:55:27 -0400 |
commit | 53bb857c373d6b7936f8a7b4451f0a99703c308e (patch) | |
tree | 946633c0cbb9ae3a4b374f6896cc9cf5544f0a4a /kernel/rcutree.c | |
parent | eee058826100e5a344f11601e0c47baeaf07c77b (diff) |
rcu: Dump number of callbacks in stall warning messages
In theory, if a grace period manages to get started despite there being
no callbacks on any of the CPUs, all CPUs could go into dyntick-idle
mode, so that the grace period would never end. This commit updates
the RCU CPU stall warning messages to detect this condition by summing
up the number of callbacks on all CPUs.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 8f4de3a7c1f7..24b21cba2cc8 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -903,6 +903,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp) | |||
903 | unsigned long flags; | 903 | unsigned long flags; |
904 | int ndetected = 0; | 904 | int ndetected = 0; |
905 | struct rcu_node *rnp = rcu_get_root(rsp); | 905 | struct rcu_node *rnp = rcu_get_root(rsp); |
906 | long totqlen = 0; | ||
906 | 907 | ||
907 | /* Only let one CPU complain about others per time interval. */ | 908 | /* Only let one CPU complain about others per time interval. */ |
908 | 909 | ||
@@ -947,9 +948,11 @@ static void print_other_cpu_stall(struct rcu_state *rsp) | |||
947 | raw_spin_unlock_irqrestore(&rnp->lock, flags); | 948 | raw_spin_unlock_irqrestore(&rnp->lock, flags); |
948 | 949 | ||
949 | print_cpu_stall_info_end(); | 950 | print_cpu_stall_info_end(); |
950 | pr_cont("(detected by %d, t=%ld jiffies, g=%lu, c=%lu)\n", | 951 | for_each_possible_cpu(cpu) |
952 | totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen; | ||
953 | pr_cont("(detected by %d, t=%ld jiffies, g=%lu, c=%lu, q=%lu)\n", | ||
951 | smp_processor_id(), (long)(jiffies - rsp->gp_start), | 954 | smp_processor_id(), (long)(jiffies - rsp->gp_start), |
952 | rsp->gpnum, rsp->completed); | 955 | rsp->gpnum, rsp->completed, totqlen); |
953 | if (ndetected == 0) | 956 | if (ndetected == 0) |
954 | printk(KERN_ERR "INFO: Stall ended before state dump start\n"); | 957 | printk(KERN_ERR "INFO: Stall ended before state dump start\n"); |
955 | else if (!trigger_all_cpu_backtrace()) | 958 | else if (!trigger_all_cpu_backtrace()) |
@@ -964,8 +967,10 @@ static void print_other_cpu_stall(struct rcu_state *rsp) | |||
964 | 967 | ||
965 | static void print_cpu_stall(struct rcu_state *rsp) | 968 | static void print_cpu_stall(struct rcu_state *rsp) |
966 | { | 969 | { |
970 | int cpu; | ||
967 | unsigned long flags; | 971 | unsigned long flags; |
968 | struct rcu_node *rnp = rcu_get_root(rsp); | 972 | struct rcu_node *rnp = rcu_get_root(rsp); |
973 | long totqlen = 0; | ||
969 | 974 | ||
970 | /* | 975 | /* |
971 | * OK, time to rat on ourselves... | 976 | * OK, time to rat on ourselves... |
@@ -976,8 +981,10 @@ static void print_cpu_stall(struct rcu_state *rsp) | |||
976 | print_cpu_stall_info_begin(); | 981 | print_cpu_stall_info_begin(); |
977 | print_cpu_stall_info(rsp, smp_processor_id()); | 982 | print_cpu_stall_info(rsp, smp_processor_id()); |
978 | print_cpu_stall_info_end(); | 983 | print_cpu_stall_info_end(); |
979 | pr_cont(" (t=%lu jiffies g=%lu c=%lu)\n", | 984 | for_each_possible_cpu(cpu) |
980 | jiffies - rsp->gp_start, rsp->gpnum, rsp->completed); | 985 | totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen; |
986 | pr_cont(" (t=%lu jiffies g=%lu c=%lu q=%lu)\n", | ||
987 | jiffies - rsp->gp_start, rsp->gpnum, rsp->completed, totqlen); | ||
981 | if (!trigger_all_cpu_backtrace()) | 988 | if (!trigger_all_cpu_backtrace()) |
982 | dump_stack(); | 989 | dump_stack(); |
983 | 990 | ||