aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.h
diff options
context:
space:
mode:
authorDimitri Sivanich <sivanich@sgi.com>2012-06-29 17:17:29 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-09-23 10:41:53 -0400
commitb402b73b3afe3614bc0e921ebe18013ea103115a (patch)
treed5f941ae2bbae05e496ff1b8415bffc30b6a80b8 /kernel/rcutree.h
parentb626c1b689364859ccd2e86d5e043aeadfeb2cd4 (diff)
rcu: Segregate rcu_state fields to improve cache locality
The fields in the rcu_state structure that are protected by the root rcu_node structure's ->lock can share a cache line with the fields protected by ->onofflock. This can result in excessive memory contention on large systems, so this commit applies ____cacheline_internodealigned_in_smp to the ->onofflock field in order to segregate them. Signed-off-by: Dimitri Sivanich <sivanich@sgi.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Dimitri Sivanich <sivanich@sgi.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.h')
-rw-r--r--kernel/rcutree.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index effb2733b7fc..5d92b80a0a28 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -394,7 +394,8 @@ struct rcu_state {
394 394
395 /* End of fields guarded by root rcu_node's lock. */ 395 /* End of fields guarded by root rcu_node's lock. */
396 396
397 raw_spinlock_t onofflock; /* exclude on/offline and */ 397 raw_spinlock_t onofflock ____cacheline_internodealigned_in_smp;
398 /* exclude on/offline and */
398 /* starting new GP. */ 399 /* starting new GP. */
399 struct rcu_head *orphan_nxtlist; /* Orphaned callbacks that */ 400 struct rcu_head *orphan_nxtlist; /* Orphaned callbacks that */
400 /* need a grace period. */ 401 /* need a grace period. */