diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2009-09-13 12:15:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-17 18:06:13 -0400 |
commit | b0e165c035b13e1074fa0b555318bd9cb7102558 (patch) | |
tree | c65de438df4e8ad3e9e562663b377d61cc87af57 /kernel/rcutree.c | |
parent | bbe3eae8bb039b5ffd64a6e3d1a0deaa1f3cbae9 (diff) |
rcu: Add debug checks to TREE_PREEMPT_RCU for premature grace periods
Check to make sure that there are no blocked tasks for the previous
grace period while initializing for the next grace period, verify
that rcu_preempt_qs() is given the correct CPU number and is never
called for an offline CPU.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
LKML-Reference: <12528585111986-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index da301e2fd84f..e9a4ae94647f 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -632,6 +632,7 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags) | |||
632 | /* Special-case the common single-level case. */ | 632 | /* Special-case the common single-level case. */ |
633 | if (NUM_RCU_NODES == 1) { | 633 | if (NUM_RCU_NODES == 1) { |
634 | rnp->qsmask = rnp->qsmaskinit; | 634 | rnp->qsmask = rnp->qsmaskinit; |
635 | rcu_preempt_check_blocked_tasks(rnp); | ||
635 | rnp->gpnum = rsp->gpnum; | 636 | rnp->gpnum = rsp->gpnum; |
636 | rsp->signaled = RCU_SIGNAL_INIT; /* force_quiescent_state OK. */ | 637 | rsp->signaled = RCU_SIGNAL_INIT; /* force_quiescent_state OK. */ |
637 | spin_unlock_irqrestore(&rnp->lock, flags); | 638 | spin_unlock_irqrestore(&rnp->lock, flags); |
@@ -665,6 +666,7 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags) | |||
665 | for (rnp_cur = &rsp->node[0]; rnp_cur < rnp_end; rnp_cur++) { | 666 | for (rnp_cur = &rsp->node[0]; rnp_cur < rnp_end; rnp_cur++) { |
666 | spin_lock(&rnp_cur->lock); /* irqs already disabled. */ | 667 | spin_lock(&rnp_cur->lock); /* irqs already disabled. */ |
667 | rnp_cur->qsmask = rnp_cur->qsmaskinit; | 668 | rnp_cur->qsmask = rnp_cur->qsmaskinit; |
669 | rcu_preempt_check_blocked_tasks(rnp); | ||
668 | rnp->gpnum = rsp->gpnum; | 670 | rnp->gpnum = rsp->gpnum; |
669 | spin_unlock(&rnp_cur->lock); /* irqs already disabled. */ | 671 | spin_unlock(&rnp_cur->lock); /* irqs already disabled. */ |
670 | } | 672 | } |