diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-05-29 02:57:46 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-07-02 15:33:21 -0400 |
commit | 06668efa9180f4824fe846a8ff96338c18646bc7 (patch) | |
tree | 2bda53825cb3437af82bc1db4a4114ee8e29e954 /kernel/rcutree.c | |
parent | 037b64ed0bf2405a1a01542164d3418564b44fff (diff) |
rcu: Move _rcu_barrier()'s rcu_head structures to rcu_data structures
In order for multiple flavors of RCU to each concurrently run one
rcu_barrier(), each flavor needs its own per-CPU set of rcu_head
structures. This commit therefore moves _rcu_barrier()'s set of
per-CPU rcu_head structures from per-CPU variables to the existing
per-CPU and per-RCU-flavor rcu_data structures.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 00c518fa34bb..1e552598b55d 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -157,7 +157,6 @@ unsigned long rcutorture_vernum; | |||
157 | 157 | ||
158 | /* State information for rcu_barrier() and friends. */ | 158 | /* State information for rcu_barrier() and friends. */ |
159 | 159 | ||
160 | static DEFINE_PER_CPU(struct rcu_head, rcu_barrier_head) = {NULL}; | ||
161 | static atomic_t rcu_barrier_cpu_count; | 160 | static atomic_t rcu_barrier_cpu_count; |
162 | static DEFINE_MUTEX(rcu_barrier_mutex); | 161 | static DEFINE_MUTEX(rcu_barrier_mutex); |
163 | static struct completion rcu_barrier_completion; | 162 | static struct completion rcu_barrier_completion; |
@@ -2282,12 +2281,11 @@ static void rcu_barrier_callback(struct rcu_head *notused) | |||
2282 | */ | 2281 | */ |
2283 | static void rcu_barrier_func(void *type) | 2282 | static void rcu_barrier_func(void *type) |
2284 | { | 2283 | { |
2285 | int cpu = smp_processor_id(); | ||
2286 | struct rcu_head *head = &per_cpu(rcu_barrier_head, cpu); | ||
2287 | struct rcu_state *rsp = type; | 2284 | struct rcu_state *rsp = type; |
2285 | struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); | ||
2288 | 2286 | ||
2289 | atomic_inc(&rcu_barrier_cpu_count); | 2287 | atomic_inc(&rcu_barrier_cpu_count); |
2290 | rsp->call(head, rcu_barrier_callback); | 2288 | rsp->call(&rdp->barrier_head, rcu_barrier_callback); |
2291 | } | 2289 | } |
2292 | 2290 | ||
2293 | /* | 2291 | /* |