summaryrefslogtreecommitdiff
path: root/kernel/rcu/tree.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.ibm.com>2019-06-02 13:41:08 -0700
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-08-13 14:35:49 -0700
commit4fd8c5f153bc41ae847b9ddb1539b34f70c18278 (patch)
tree9ee82606a6959988cb925ec1404e37b66f6145a4 /kernel/rcu/tree.h
parent523bddd553c09a2cf051eb724bffba680424f5ec (diff)
rcu/nocb: Reduce ->nocb_lock contention with separate ->nocb_gp_lock
The sleep/wakeup of the no-CBs grace-period kthreads is synchronized using the ->nocb_lock of the first CPU corresponding to that kthread. This commit provides a separate ->nocb_gp_lock for this purpose, thus reducing contention on ->nocb_lock. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.h')
-rw-r--r--kernel/rcu/tree.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index 7062f9d9c053..2c3e9068671c 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -202,7 +202,8 @@ struct rcu_data {
struct timer_list nocb_timer; /* Enforce finite deferral. */
/* The following fields are used by GP kthread, hence own cacheline. */
- bool nocb_gp_sleep ____cacheline_internodealigned_in_smp;
+ raw_spinlock_t nocb_gp_lock ____cacheline_internodealigned_in_smp;
+ bool nocb_gp_sleep;
/* Is the nocb GP thread asleep? */
struct swait_queue_head nocb_gp_wq; /* For nocb kthreads to sleep on. */
bool nocb_cb_sleep; /* Is the nocb CB thread asleep? */