summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.h
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2010-06-28 10:25:04 +0200
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-08-20 02:18:01 +0200
commit394f99a9007d4274f7076bb8553ab0ff9707688b (patch)
tree7d379f91321cec58b87fd5f5089947872689d591 /kernel/rcutree.h
parentrcutorture: add random preemption (diff)
downloadlinux-394f99a9007d4274f7076bb8553ab0ff9707688b.tar.xz
linux-394f99a9007d4274f7076bb8553ab0ff9707688b.zip
rcu: simplify the usage of percpu data
&percpu_data is compatible with allocated percpu data. And we use it and remove the "->rda[NR_CPUS]" array, saving significant storage on systems with large numbers of CPUs. This does add an additional level of indirection and thus an additional cache line referenced, but because ->rda is not used on the read side, this is OK. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Reviewed-by: Tejun Heo <tj@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.h')
-rw-r--r--kernel/rcutree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index 14c040b18ed0..5ce197e87792 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -283,7 +283,7 @@ struct rcu_state {
struct rcu_node *level[NUM_RCU_LVLS]; /* Hierarchy levels. */
u32 levelcnt[MAX_RCU_LVLS + 1]; /* # nodes in each level. */
u8 levelspread[NUM_RCU_LVLS]; /* kids/node in each level. */
- struct rcu_data *rda[NR_CPUS]; /* array of rdp pointers. */
+ struct rcu_data __percpu *rda; /* pointer of percu rcu_data. */
/* The following fields are guarded by the root rcu_node's lock. */