summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2023-03-17 14:43:08 -0700
committerPaul E. McKenney <paulmck@kernel.org>2023-04-04 08:35:44 -0700
commit208f41b1312443401353bec0c1939e2bfc28adce (patch)
treed540494622fb20eb85d5efac94319682ba96b3f8 /include
parent95433f7263011e0e6e83caef85d98896dd99cab7 (diff)
downloadlinux-stable-208f41b1312443401353bec0c1939e2bfc28adce.tar.gz
linux-stable-208f41b1312443401353bec0c1939e2bfc28adce.tar.bz2
linux-stable-208f41b1312443401353bec0c1939e2bfc28adce.zip
srcu: Move ->level from srcu_struct to srcu_usage
This commit moves the ->level[] array 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')
-rw-r--r--include/linux/srcutree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h
index 276f325f1296..c7373fe5c14b 100644
--- a/include/linux/srcutree.h
+++ b/include/linux/srcutree.h
@@ -62,14 +62,14 @@ struct srcu_node {
*/
struct srcu_usage {
struct srcu_node *node; /* Combining tree. */
+ struct srcu_node *level[RCU_NUM_LVLS + 1];
+ /* First node at each level. */
};
/*
* Per-SRCU-domain structure, similar in function to rcu_state.
*/
struct srcu_struct {
- 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. */
spinlock_t __private lock; /* Protect counters and size state. */