From: Paul E. McKenney Date: Thu, 28 Jun 2018 04:48:00 +0000 (-0700) Subject: rcu: Allow processing deferred QSes for exiting RCU-preempt readers X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~6130^2^2^2~111 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=27c744e32a9a4066daca0ee7496819bff78c1b37;p=linux.git rcu: Allow processing deferred QSes for exiting RCU-preempt readers 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 --- diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 542791361908..24c209676d20 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -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; } /*