提交 285fe294 编写于 作者: P Paul E. McKenney 提交者: Paul E. McKenney

rcu: Fix detection of abruptly-ending stall

The code that attempts to identify stalls that end just as we detect
them is broken by both flavors of initialization failure.  This commit
therefore properly initializes and computes the count of the number
of reasons why the RCU grace period is stalled.
Signed-off-by: NPaul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
上级 cba6d0d6
...@@ -733,7 +733,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp) ...@@ -733,7 +733,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
int cpu; int cpu;
long delta; long delta;
unsigned long flags; unsigned long flags;
int ndetected; int ndetected = 0;
struct rcu_node *rnp = rcu_get_root(rsp); struct rcu_node *rnp = rcu_get_root(rsp);
/* Only let one CPU complain about others per time interval. */ /* Only let one CPU complain about others per time interval. */
...@@ -774,7 +774,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp) ...@@ -774,7 +774,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
*/ */
rnp = rcu_get_root(rsp); rnp = rcu_get_root(rsp);
raw_spin_lock_irqsave(&rnp->lock, flags); raw_spin_lock_irqsave(&rnp->lock, flags);
ndetected = rcu_print_task_stall(rnp); ndetected += rcu_print_task_stall(rnp);
raw_spin_unlock_irqrestore(&rnp->lock, flags); raw_spin_unlock_irqrestore(&rnp->lock, flags);
print_cpu_stall_info_end(); print_cpu_stall_info_end();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册