rcu: Make non-preemptive schedule be Tasks RCU quiescent state
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 11 Apr 2017 22:50:41 +0000 (15:50 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 21 Apr 2017 12:59:27 +0000 (05:59 -0700)
commitbcbfdd01dce5556a952fae84ef16fd0f12525e7b
treed674b23e7a573c6e5234acb5e914fc60e581594a
parent0497b489b8255054f113fd31faeb72f6dbc50a68
rcu: Make non-preemptive schedule be Tasks RCU quiescent state

Currently, a call to schedule() acts as a Tasks RCU quiescent state
only if a context switch actually takes place.  However, just the
call to schedule() guarantees that the calling task has moved off of
whatever tracing trampoline that it might have been one previously.
This commit therefore plumbs schedule()'s "preempt" parameter into
rcu_note_context_switch(), which then records the Tasks RCU quiescent
state, but only if this call to schedule() was -not- due to a preemption.

To avoid adding overhead to the common-case context-switch path,
this commit hides the rcu_note_context_switch() check under an existing
non-common-case check.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
include/linux/rcupdate.h
include/linux/rcutiny.h
include/linux/rcutree.h
kernel/rcu/tree.c
kernel/rcu/update.c
kernel/sched/core.c