rcu: Add diagnostics to grace-period cleanup
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 9 Feb 2015 13:37:47 +0000 (05:37 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 12 Mar 2015 22:19:38 +0000 (15:19 -0700)
At grace-period initialization time, RCU checks that all quiescent
states were really reported for the previous grace period.  Now that
grace-period cleanup has been split out of grace-period initialization,
this commit also performs those checks at grace-period cleanup time.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c

index d5247ed440048cf5cd65fea73a366c4d855cec6a..17b5abf999ca5efb4248d5df3986d164e99ffa39 100644 (file)
@@ -1920,6 +1920,8 @@ static void rcu_gp_cleanup(struct rcu_state *rsp)
        rcu_for_each_node_breadth_first(rsp, rnp) {
                raw_spin_lock_irq(&rnp->lock);
                smp_mb__after_unlock_lock();
+               WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp));
+               WARN_ON_ONCE(rnp->qsmask);
                ACCESS_ONCE(rnp->completed) = rsp->gpnum;
                rdp = this_cpu_ptr(rsp->rda);
                if (rnp == rdp->mynode)