rcu: Pull out wait_event*() condition into helper function
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 1 Jul 2015 20:50:28 +0000 (13:50 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 17 Jul 2015 21:59:04 +0000 (14:59 -0700)
commitb9a425cfcb3c473b4ca2f3dfaeaf13848f4a7976
tree440b7afc650a58987220eb4fffb443552363adf4
parent99a930b0d2b018f31474d69137f311ce3581a4c2
rcu: Pull out wait_event*() condition into helper function

The condition for the wait_event_interruptible_timeout() that waits
to do the next force-quiescent-state scan is a bit ornate:

((gf = READ_ONCE(rsp->gp_flags)) &
 RCU_GP_FLAG_FQS) ||
(!READ_ONCE(rnp->qsmask) &&
 !rcu_preempt_blocked_readers_cgp(rnp))

This commit therefore pulls this condition out into a helper function
and comments its component conditions.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c