summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_trace.c
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_trace.c
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_trace.c')
-rw-r--r--kernel/rcutree_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
index 36c95b45738e..458e032a3a30 100644
--- a/kernel/rcutree_trace.c
+++ b/kernel/rcutree_trace.c
@@ -262,7 +262,7 @@ static void print_rcu_pendings(struct seq_file *m, struct rcu_state *rsp)
struct rcu_data *rdp;
for_each_possible_cpu(cpu) {
- rdp = rsp->rda[cpu];
+ rdp = per_cpu_ptr(rsp->rda, cpu);
if (rdp->beenonline)
print_one_rcu_pending(m, rdp);
}