summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.ibm.com>2019-07-02 03:36:53 +0300
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-08-14 00:35:49 +0300
commiteda669a6a2c517fd6db41d0fe3c95c1b749c60bd (patch)
tree00d46158f1c02fff813a6d874f2ab0bef81078af /include
parentfaca5c250935262f026cac1bb951a0f7672474b8 (diff)
downloadlinux-eda669a6a2c517fd6db41d0fe3c95c1b749c60bd.tar.xz
rcu/nocb: Atomic ->len field in rcu_segcblist structure
Upcoming ->nocb_lock contention-reduction work requires that the rcu_segcblist structure's ->len field be concurrently manipulated, but only if there are no-CBs CPUs in the kernel. This commit therefore makes this ->len field be an atomic_long_t, but only in CONFIG_RCU_NOCB_CPU=y kernels. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rcu_segcblist.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/rcu_segcblist.h b/include/linux/rcu_segcblist.h
index 8b684888f71d..646759042333 100644
--- a/include/linux/rcu_segcblist.h
+++ b/include/linux/rcu_segcblist.h
@@ -68,7 +68,11 @@ struct rcu_segcblist {
struct rcu_head *head;
struct rcu_head **tails[RCU_CBLIST_NSEGS];
unsigned long gp_seq[RCU_CBLIST_NSEGS];
+#ifdef CONFIG_RCU_NOCB_CPU
+ atomic_long_t len;
+#else
long len;
+#endif
long len_lazy;
u8 enabled;
u8 offloaded;