rcu: Place guard on rcu_all_qs() and rcu_note_context_switch() actions
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 27 Jan 2017 22:17:50 +0000 (14:17 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 18 Apr 2017 18:38:18 +0000 (11:38 -0700)
commit9226b10d78ffe7895549045fe388dc5e73b87eac
tree29d959a37f8d502c97948e49f895ae3269793b12
parent0f9be8cabbc343218dd2807af7308656be113045
rcu: Place guard on rcu_all_qs() and rcu_note_context_switch() actions

The rcu_all_qs() and rcu_note_context_switch() do a series of checks,
taking various actions to supply RCU with quiescent states, depending
on the outcomes of the various checks.  This is a bit much for scheduling
fastpaths, so this commit creates a separate ->rcu_urgent_qs field in
the rcu_dynticks structure that acts as a global guard for these checks.
Thus, in the common case, rcu_all_qs() and rcu_note_context_switch()
check the ->rcu_urgent_qs field, find it false, and simply return.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Documentation/RCU/Design/Data-Structures/Data-Structures.html
kernel/rcu/tree.c
kernel/rcu/tree.h
kernel/rcu/tree_exp.h
kernel/rcu/tree_plugin.h