diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-07 05:17:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-07 05:17:34 -0400 |
commit | 44347d947f628060b92449702071bfe1d31dfb75 (patch) | |
tree | c6ed74610d5b3295df4296659f80f5feb94b28cc /kernel/rcupdate.c | |
parent | d94fc523f3c35bd8013f04827e94756cbc0212f4 (diff) | |
parent | 413f81eba35d6ede9289b0c8a920c013a84fac71 (diff) |
Merge branch 'linus' into tracing/core
Merge reason: tracing/core was on a .30-rc1 base and was missing out on
on a handful of tracing fixes present in .30-rc5-almost.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/rcupdate.c')
-rw-r--r-- | kernel/rcupdate.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 2c7b8457d0d2..a967c9feb90a 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -58,6 +58,10 @@ static DEFINE_MUTEX(rcu_barrier_mutex); | |||
58 | static struct completion rcu_barrier_completion; | 58 | static struct completion rcu_barrier_completion; |
59 | int rcu_scheduler_active __read_mostly; | 59 | int rcu_scheduler_active __read_mostly; |
60 | 60 | ||
61 | static atomic_t rcu_migrate_type_count = ATOMIC_INIT(0); | ||
62 | static struct rcu_head rcu_migrate_head[3]; | ||
63 | static DECLARE_WAIT_QUEUE_HEAD(rcu_migrate_wq); | ||
64 | |||
61 | /* | 65 | /* |
62 | * Awaken the corresponding synchronize_rcu() instance now that a | 66 | * Awaken the corresponding synchronize_rcu() instance now that a |
63 | * grace period has elapsed. | 67 | * grace period has elapsed. |
@@ -122,7 +126,10 @@ static void rcu_barrier_func(void *type) | |||
122 | } | 126 | } |
123 | } | 127 | } |
124 | 128 | ||
125 | static inline void wait_migrated_callbacks(void); | 129 | static inline void wait_migrated_callbacks(void) |
130 | { | ||
131 | wait_event(rcu_migrate_wq, !atomic_read(&rcu_migrate_type_count)); | ||
132 | } | ||
126 | 133 | ||
127 | /* | 134 | /* |
128 | * Orchestrate the specified type of RCU barrier, waiting for all | 135 | * Orchestrate the specified type of RCU barrier, waiting for all |
@@ -179,21 +186,12 @@ void rcu_barrier_sched(void) | |||
179 | } | 186 | } |
180 | EXPORT_SYMBOL_GPL(rcu_barrier_sched); | 187 | EXPORT_SYMBOL_GPL(rcu_barrier_sched); |
181 | 188 | ||
182 | static atomic_t rcu_migrate_type_count = ATOMIC_INIT(0); | ||
183 | static struct rcu_head rcu_migrate_head[3]; | ||
184 | static DECLARE_WAIT_QUEUE_HEAD(rcu_migrate_wq); | ||
185 | |||
186 | static void rcu_migrate_callback(struct rcu_head *notused) | 189 | static void rcu_migrate_callback(struct rcu_head *notused) |
187 | { | 190 | { |
188 | if (atomic_dec_and_test(&rcu_migrate_type_count)) | 191 | if (atomic_dec_and_test(&rcu_migrate_type_count)) |
189 | wake_up(&rcu_migrate_wq); | 192 | wake_up(&rcu_migrate_wq); |
190 | } | 193 | } |
191 | 194 | ||
192 | static inline void wait_migrated_callbacks(void) | ||
193 | { | ||
194 | wait_event(rcu_migrate_wq, !atomic_read(&rcu_migrate_type_count)); | ||
195 | } | ||
196 | |||
197 | static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self, | 195 | static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self, |
198 | unsigned long action, void *hcpu) | 196 | unsigned long action, void *hcpu) |
199 | { | 197 | { |