aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-03-06 16:37:09 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-03-13 17:43:56 -0400
commit6231069bdab575fce862ca786f1c0ba5e4e9ba3b (patch)
tree95c88dfa505c5ae3b27df9bcffb07edf3dae511f /kernel/rcutree_plugin.h
parent49d0de082c31de34cc896c14eec5f1c2ade0415a (diff)
rcu: Add softirq-stall indications to stall-warning messages
If RCU's softirq handler is prevented from executing, an RCU CPU stall warning can result. Ways to prevent RCU's softirq handler from executing include: (1) CPU spinning with interrupts disabled, (2) infinite loop in some softirq handler, and (3) in -rt kernels, an infinite loop in a set of real-time threads running at priorities higher than that of RCU's softirq handler. Because this situation can be difficult to track down, this commit causes the count of RCU softirq handler invocations to be printed with RCU CPU stall warnings. This information does require some interpretation, as now documented in Documentation/RCU/stallwarn.txt. Reported-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r--kernel/rcutree_plugin.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index c1cc7e17ff9d..7fcd3bbf67da 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -2070,10 +2070,11 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
2070 ticks_value = rsp->gpnum - rdp->gpnum; 2070 ticks_value = rsp->gpnum - rdp->gpnum;
2071 } 2071 }
2072 print_cpu_stall_fast_no_hz(fast_no_hz, cpu); 2072 print_cpu_stall_fast_no_hz(fast_no_hz, cpu);
2073 printk(KERN_ERR "\t%d: (%lu %s) idle=%03x/%llx/%d %s\n", 2073 printk(KERN_ERR "\t%d: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u %s\n",
2074 cpu, ticks_value, ticks_title, 2074 cpu, ticks_value, ticks_title,
2075 atomic_read(&rdtp->dynticks) & 0xfff, 2075 atomic_read(&rdtp->dynticks) & 0xfff,
2076 rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting, 2076 rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting,
2077 rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu),
2077 fast_no_hz); 2078 fast_no_hz);
2078} 2079}
2079 2080
@@ -2087,6 +2088,7 @@ static void print_cpu_stall_info_end(void)
2087static void zero_cpu_stall_ticks(struct rcu_data *rdp) 2088static void zero_cpu_stall_ticks(struct rcu_data *rdp)
2088{ 2089{
2089 rdp->ticks_this_gp = 0; 2090 rdp->ticks_this_gp = 0;
2091 rdp->softirq_snap = kstat_softirqs_cpu(RCU_SOFTIRQ, smp_processor_id());
2090} 2092}
2091 2093
2092/* Increment ->ticks_this_gp for all flavors of RCU. */ 2094/* Increment ->ticks_this_gp for all flavors of RCU. */