diff options
author | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-07-02 03:36:53 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-08-14 00:35:49 +0300 |
commit | eda669a6a2c517fd6db41d0fe3c95c1b749c60bd (patch) | |
tree | 00d46158f1c02fff813a6d874f2ab0bef81078af /include | |
parent | faca5c250935262f026cac1bb951a0f7672474b8 (diff) | |
download | linux-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.h | 4 |
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; |