diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-03-16 14:53:52 -0400 | 
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-05-27 15:58:01 -0400 | 
| commit | cd73ca21cd2bb3711b8d80ba74c90d37ef15fe4d (patch) | |
| tree | af8915695057dad40b62a592a99d608de815d9d3 /kernel/rcu/tree.c | |
| parent | 3382adbc1bb8c80ea512243acf6059564287620b (diff) | |
rcu: Force wakeup of rcu_gp_kthread at grace-period end
The rcu_gp_kthread_wake() refuses to do a wakeup unless at least
one of the ->gp_flags bits are set, which normally will not be the
case when the last quiescent state is reported.  This results in
up to a 3-jiffy delay given default Kconfig settings.  This commit
therefore has rcu_report_qs_rsp() set RCU_GP_FLAG_FQS before invoking
rcu_gp_kthread_wake() in order to force a more immediate wakeup at
grace-period end, thus reducing grace-period latencies.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
| -rw-r--r-- | kernel/rcu/tree.c | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 213f644d6fb1..7d369b829598 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -2139,6 +2139,7 @@ static void rcu_report_qs_rsp(struct rcu_state *rsp, unsigned long flags) | |||
| 2139 | __releases(rcu_get_root(rsp)->lock) | 2139 | __releases(rcu_get_root(rsp)->lock) | 
| 2140 | { | 2140 | { | 
| 2141 | WARN_ON_ONCE(!rcu_gp_in_progress(rsp)); | 2141 | WARN_ON_ONCE(!rcu_gp_in_progress(rsp)); | 
| 2142 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); | ||
| 2142 | raw_spin_unlock_irqrestore(&rcu_get_root(rsp)->lock, flags); | 2143 | raw_spin_unlock_irqrestore(&rcu_get_root(rsp)->lock, flags); | 
| 2143 | rcu_gp_kthread_wake(rsp); | 2144 | rcu_gp_kthread_wake(rsp); | 
| 2144 | } | 2145 | } | 
