rcu: Allow processing deferred QSes for exiting RCU-preempt readers
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 28 Jun 2018 04:48:00 +0000 (21:48 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 30 Aug 2018 23:02:35 +0000 (16:02 -0700)
If an RCU-preempt read-side critical section is exiting, that is,
->rcu_read_lock_nesting is negative, then it is a good time to look
at the possibility of reporting deferred quiescent states.  This
commit therefore updates the checks in rcu_preempt_need_deferred_qs()
to allow exiting critical sections to report deferred quiescent states.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree_plugin.h

index 542791361908325e50c118a2015a22bf00a0df61..24c209676d2099e8c796b3bb294e2d544b5d3033 100644 (file)
@@ -602,7 +602,7 @@ static bool rcu_preempt_need_deferred_qs(struct task_struct *t)
 {
        return (this_cpu_ptr(&rcu_preempt_data)->deferred_qs ||
                READ_ONCE(t->rcu_read_unlock_special.s)) &&
-              !t->rcu_read_lock_nesting;
+              t->rcu_read_lock_nesting <= 0;
 }
 
 /*