rcu: Eliminate RCU_FAST_NO_HZ grace-period hang
authorPaul E. McKenney <paul.mckenney@linaro.org>
Wed, 23 Nov 2011 04:43:02 +0000 (20:43 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 11 Dec 2011 18:32:02 +0000 (10:32 -0800)
commitf535a607c13c7b674e0788ca5765779aa74a01c3
tree433a07d16ff11d9f67e7991831cebf3cadfd9939
parent84ad00cb61f1cb21f0b63bc6f7dc254399eb3830
rcu: Eliminate RCU_FAST_NO_HZ grace-period hang

With the new implementation of RCU_FAST_NO_HZ, it was possible to hang
RCU grace periods as follows:

o CPU 0 attempts to go idle, cycles several times through the
rcu_prepare_for_idle() loop, then goes dyntick-idle when
RCU needs nothing more from it, while still having at least
on RCU callback pending.

o CPU 1 goes idle with no callbacks.

Both CPUs can then stay in dyntick-idle mode indefinitely, preventing
the RCU grace period from ever completing, possibly hanging the system.

This commit therefore prevents CPUs that have RCU callbacks from entering
dyntick-idle mode.  This approach also eliminates the need for the
end-of-grace-period IPIs used previously.

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