diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-03-16 16:47:55 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-03-31 13:34:11 -0700 |
commit | 3b5f668e715bc19610ad967ef97a7e8c55a186ec (patch) | |
tree | 1adb1e9d9d1aa5220163ae2cefccc27bd93e3db4 /kernel/rcu/tree.h | |
parent | aff12cdf86e6fa891d1c30c0fad112d138bd7b10 (diff) | |
download | linux-3b5f668e715bc19610ad967ef97a7e8c55a186ec.tar.gz linux-3b5f668e715bc19610ad967ef97a7e8c55a186ec.tar.bz2 linux-3b5f668e715bc19610ad967ef97a7e8c55a186ec.zip |
rcu: Overlap wakeups with next expedited grace period
The current expedited grace-period implementation makes subsequent grace
periods wait on wakeups for the prior grace period. This does not fit
the dictionary definition of "expedited", so this commit allows these two
phases to overlap. Doing this requires four waitqueues rather than two
because tasks can now be waiting on the previous, current, and next grace
periods. The fourth waitqueue makes the bit masking work out nicely.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.h')
-rw-r--r-- | kernel/rcu/tree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index f9d4fbb1e014..1194ab0da56a 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -250,7 +250,7 @@ struct rcu_node { spinlock_t exp_lock ____cacheline_internodealigned_in_smp; unsigned long exp_seq_rq; - wait_queue_head_t exp_wq[2]; + wait_queue_head_t exp_wq[4]; } ____cacheline_internodealigned_in_smp; /* @@ -502,6 +502,7 @@ struct rcu_state { /* End of fields guarded by barrier_mutex. */ struct mutex exp_mutex; /* Serialize expedited GP. */ + struct mutex exp_wake_mutex; /* Serialize wakeup. */ unsigned long expedited_sequence; /* Take a ticket. */ atomic_long_t expedited_normal; /* # fallbacks to normal. */ atomic_t expedited_need_qs; /* # CPUs left to check in. */ |