rcu: Identify dyntick-idle CPUs on first force_quiescent_state() pass
authorPaul E. McKenney <paul.mckenney@linaro.org>
Wed, 23 Nov 2011 23:02:05 +0000 (15:02 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 11 Dec 2011 18:32:05 +0000 (10:32 -0800)
Fixes and workarounds for a number of issues (for example, that in
df4012edc) make it safe to once again detect dyntick-idle CPUs on the
first pass of force_quiescent_state(), so this commit makes that change.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcutree.c

index aab9ed504b17e21b411e25aa24634bdaedc509d2..69bb37287cc8946f0b0521cbeb75b6a223b51668 100644 (file)
@@ -607,7 +607,7 @@ int rcu_is_cpu_rrupt_from_idle(void)
 static int dyntick_save_progress_counter(struct rcu_data *rdp)
 {
        rdp->dynticks_snap = atomic_add_return(0, &rdp->dynticks->dynticks);
-       return 0;
+       return (rdp->dynticks_snap & 0x1) == 0;
 }
 
 /*