The rcu_preempt_offline_tasks() checks for any of the rcu_node structure's
CPUs still being in an RCU critical section. However, it is extremely
unlikely that any will be due to the fact that all the CPUs must be
offline when this function is called. This commit therefore moves the
check from the "if" statement to a "WARN_ON()".
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
/* If we are on an internal node, complain bitterly. */
WARN_ON_ONCE(rnp != rdp->mynode);
+ /* If any offline CPUs are blocking current GP, complain bitterly. */
+ WARN_ON_ONCE(rnp->qsmask != 0);
/*
* Move tasks up to root rcu_node. Don't try to get fancy for
* absolutely necessary, but this is a good performance/complexity
* tradeoff.
*/
- if (rcu_preempt_blocked_readers_cgp(rnp) && rnp->qsmask == 0)
+ if (rcu_preempt_blocked_readers_cgp(rnp))
retval |= RCU_OFL_TASKS_NORM_GP;
if (rcu_preempted_readers_exp(rnp))
retval |= RCU_OFL_TASKS_EXP_GP;