aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/srcutree.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2023-03-17 17:22:27 -0700
committerPaul E. McKenney <paulmck@kernel.org>2023-04-04 08:35:56 -0700
commit574dc1a7efe490dffe5c1ce0285306feec16a880 (patch)
treeecd147fec191f8b83ba86e312dff07edb84f2442 /include/linux/srcutree.h
parentsrcu: Move ->srcu_size_state from srcu_struct to srcu_usage (diff)
downloadwireguard-linux-574dc1a7efe490dffe5c1ce0285306feec16a880.tar.xz
wireguard-linux-574dc1a7efe490dffe5c1ce0285306feec16a880.zip
srcu: Move ->srcu_cb_mutex from srcu_struct to srcu_usage
This commit moves the ->srcu_cb_mutex field from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig <hch@lst.de> Tested-by: Sachin Sant <sachinp@linux.ibm.com> Tested-by: "Zhang, Qiang1" <qiang1.zhang@intel.com> Tested-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/srcutree.h')
-rw-r--r--include/linux/srcutree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h
index 443d27a214ef..231de66ceb15 100644
--- a/include/linux/srcutree.h
+++ b/include/linux/srcutree.h
@@ -65,13 +65,13 @@ struct srcu_usage {
struct srcu_node *level[RCU_NUM_LVLS + 1];
/* First node at each level. */
int srcu_size_state; /* Small-to-big transition state. */
+ struct mutex srcu_cb_mutex; /* Serialize CB preparation. */
};
/*
* Per-SRCU-domain structure, similar in function to rcu_state.
*/
struct srcu_struct {
- struct mutex srcu_cb_mutex; /* Serialize CB preparation. */
spinlock_t __private lock; /* Protect counters and size state. */
struct mutex srcu_gp_mutex; /* Serialize GP work. */
unsigned int srcu_idx; /* Current rdr array element. */