diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2011-02-24 18:25:21 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-06 02:16:58 -0400 |
commit | 203373c81b83e98da82836c4b8b5dd1e6fc9011f (patch) | |
tree | 78e11ef799f6036ac5c9b664e5af4c10dbd6f4a2 /kernel/rcutiny_plugin.h | |
parent | ddeb75814f09205df795121d9e373e82de7f2aca (diff) |
rcu: remove useless ->boosted_this_gp field
The ->boosted_this_gp field is a holdover from an earlier design that
was to carry out multiple boost operations in parallel. It is not required
by the current design, which boosts one task at a time.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutiny_plugin.h')
-rw-r--r-- | kernel/rcutiny_plugin.h | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h index 0bc9f732d1a5..2b8d5293c5f4 100644 --- a/kernel/rcutiny_plugin.h +++ b/kernel/rcutiny_plugin.h | |||
@@ -100,7 +100,6 @@ struct rcu_preempt_ctrlblk { | |||
100 | u8 completed; /* Last grace period completed. */ | 100 | u8 completed; /* Last grace period completed. */ |
101 | /* If all three are equal, RCU is idle. */ | 101 | /* If all three are equal, RCU is idle. */ |
102 | #ifdef CONFIG_RCU_BOOST | 102 | #ifdef CONFIG_RCU_BOOST |
103 | s8 boosted_this_gp; /* Has boosting already happened? */ | ||
104 | unsigned long boost_time; /* When to start boosting (jiffies) */ | 103 | unsigned long boost_time; /* When to start boosting (jiffies) */ |
105 | #endif /* #ifdef CONFIG_RCU_BOOST */ | 104 | #endif /* #ifdef CONFIG_RCU_BOOST */ |
106 | #ifdef CONFIG_RCU_TRACE | 105 | #ifdef CONFIG_RCU_TRACE |
@@ -112,7 +111,6 @@ struct rcu_preempt_ctrlblk { | |||
112 | unsigned long n_normal_balk_blkd_tasks; | 111 | unsigned long n_normal_balk_blkd_tasks; |
113 | unsigned long n_normal_balk_gp_tasks; | 112 | unsigned long n_normal_balk_gp_tasks; |
114 | unsigned long n_normal_balk_boost_tasks; | 113 | unsigned long n_normal_balk_boost_tasks; |
115 | unsigned long n_normal_balk_boosted; | ||
116 | unsigned long n_normal_balk_notyet; | 114 | unsigned long n_normal_balk_notyet; |
117 | unsigned long n_normal_balk_nos; | 115 | unsigned long n_normal_balk_nos; |
118 | unsigned long n_exp_balk_blkd_tasks; | 116 | unsigned long n_exp_balk_blkd_tasks; |
@@ -219,36 +217,19 @@ static void show_tiny_preempt_stats(struct seq_file *m) | |||
219 | "N."[!rcu_preempt_ctrlblk.gp_tasks], | 217 | "N."[!rcu_preempt_ctrlblk.gp_tasks], |
220 | "E."[!rcu_preempt_ctrlblk.exp_tasks]); | 218 | "E."[!rcu_preempt_ctrlblk.exp_tasks]); |
221 | #ifdef CONFIG_RCU_BOOST | 219 | #ifdef CONFIG_RCU_BOOST |
222 | seq_printf(m, " ttb=%c btg=", | 220 | seq_printf(m, "%sttb=%c ntb=%lu neb=%lu nnb=%lu j=%04x bt=%04x\n", |
223 | "B."[!rcu_preempt_ctrlblk.boost_tasks]); | 221 | " ", |
224 | switch (rcu_preempt_ctrlblk.boosted_this_gp) { | 222 | "B."[!rcu_preempt_ctrlblk.boost_tasks], |
225 | case -1: | ||
226 | seq_puts(m, "exp"); | ||
227 | break; | ||
228 | case 0: | ||
229 | seq_puts(m, "no"); | ||
230 | break; | ||
231 | case 1: | ||
232 | seq_puts(m, "begun"); | ||
233 | break; | ||
234 | case 2: | ||
235 | seq_puts(m, "done"); | ||
236 | break; | ||
237 | default: | ||
238 | seq_printf(m, "?%d?", rcu_preempt_ctrlblk.boosted_this_gp); | ||
239 | } | ||
240 | seq_printf(m, " ntb=%lu neb=%lu nnb=%lu j=%04x bt=%04x\n", | ||
241 | rcu_preempt_ctrlblk.n_tasks_boosted, | 223 | rcu_preempt_ctrlblk.n_tasks_boosted, |
242 | rcu_preempt_ctrlblk.n_exp_boosts, | 224 | rcu_preempt_ctrlblk.n_exp_boosts, |
243 | rcu_preempt_ctrlblk.n_normal_boosts, | 225 | rcu_preempt_ctrlblk.n_normal_boosts, |
244 | (int)(jiffies & 0xffff), | 226 | (int)(jiffies & 0xffff), |
245 | (int)(rcu_preempt_ctrlblk.boost_time & 0xffff)); | 227 | (int)(rcu_preempt_ctrlblk.boost_time & 0xffff)); |
246 | seq_printf(m, " %s: nt=%lu gt=%lu bt=%lu b=%lu ny=%lu nos=%lu\n", | 228 | seq_printf(m, " %s: nt=%lu gt=%lu bt=%lu ny=%lu nos=%lu\n", |
247 | "normal balk", | 229 | "normal balk", |
248 | rcu_preempt_ctrlblk.n_normal_balk_blkd_tasks, | 230 | rcu_preempt_ctrlblk.n_normal_balk_blkd_tasks, |
249 | rcu_preempt_ctrlblk.n_normal_balk_gp_tasks, | 231 | rcu_preempt_ctrlblk.n_normal_balk_gp_tasks, |
250 | rcu_preempt_ctrlblk.n_normal_balk_boost_tasks, | 232 | rcu_preempt_ctrlblk.n_normal_balk_boost_tasks, |
251 | rcu_preempt_ctrlblk.n_normal_balk_boosted, | ||
252 | rcu_preempt_ctrlblk.n_normal_balk_notyet, | 233 | rcu_preempt_ctrlblk.n_normal_balk_notyet, |
253 | rcu_preempt_ctrlblk.n_normal_balk_nos); | 234 | rcu_preempt_ctrlblk.n_normal_balk_nos); |
254 | seq_printf(m, " exp balk: bt=%lu nos=%lu\n", | 235 | seq_printf(m, " exp balk: bt=%lu nos=%lu\n", |
@@ -277,7 +258,6 @@ static int rcu_boost(void) | |||
277 | if (rcu_preempt_ctrlblk.boost_tasks == NULL) | 258 | if (rcu_preempt_ctrlblk.boost_tasks == NULL) |
278 | return 0; /* Nothing to boost. */ | 259 | return 0; /* Nothing to boost. */ |
279 | raw_local_irq_save(flags); | 260 | raw_local_irq_save(flags); |
280 | rcu_preempt_ctrlblk.boosted_this_gp++; | ||
281 | t = container_of(rcu_preempt_ctrlblk.boost_tasks, struct task_struct, | 261 | t = container_of(rcu_preempt_ctrlblk.boost_tasks, struct task_struct, |
282 | rcu_node_entry); | 262 | rcu_node_entry); |
283 | np = rcu_next_node_entry(t); | 263 | np = rcu_next_node_entry(t); |
@@ -287,7 +267,6 @@ static int rcu_boost(void) | |||
287 | raw_local_irq_restore(flags); | 267 | raw_local_irq_restore(flags); |
288 | rt_mutex_lock(&mtx); | 268 | rt_mutex_lock(&mtx); |
289 | RCU_TRACE(rcu_preempt_ctrlblk.n_tasks_boosted++); | 269 | RCU_TRACE(rcu_preempt_ctrlblk.n_tasks_boosted++); |
290 | rcu_preempt_ctrlblk.boosted_this_gp++; | ||
291 | rt_mutex_unlock(&mtx); | 270 | rt_mutex_unlock(&mtx); |
292 | return rcu_preempt_ctrlblk.boost_tasks != NULL; | 271 | return rcu_preempt_ctrlblk.boost_tasks != NULL; |
293 | } | 272 | } |
@@ -310,7 +289,6 @@ static int rcu_initiate_boost(void) | |||
310 | } | 289 | } |
311 | if (rcu_preempt_ctrlblk.gp_tasks != NULL && | 290 | if (rcu_preempt_ctrlblk.gp_tasks != NULL && |
312 | rcu_preempt_ctrlblk.boost_tasks == NULL && | 291 | rcu_preempt_ctrlblk.boost_tasks == NULL && |
313 | rcu_preempt_ctrlblk.boosted_this_gp == 0 && | ||
314 | ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time)) { | 292 | ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time)) { |
315 | rcu_preempt_ctrlblk.boost_tasks = rcu_preempt_ctrlblk.gp_tasks; | 293 | rcu_preempt_ctrlblk.boost_tasks = rcu_preempt_ctrlblk.gp_tasks; |
316 | invoke_rcu_kthread(); | 294 | invoke_rcu_kthread(); |
@@ -331,7 +309,6 @@ static void rcu_initiate_expedited_boost(void) | |||
331 | if (!list_empty(&rcu_preempt_ctrlblk.blkd_tasks)) { | 309 | if (!list_empty(&rcu_preempt_ctrlblk.blkd_tasks)) { |
332 | rcu_preempt_ctrlblk.boost_tasks = | 310 | rcu_preempt_ctrlblk.boost_tasks = |
333 | rcu_preempt_ctrlblk.blkd_tasks.next; | 311 | rcu_preempt_ctrlblk.blkd_tasks.next; |
334 | rcu_preempt_ctrlblk.boosted_this_gp = -1; | ||
335 | invoke_rcu_kthread(); | 312 | invoke_rcu_kthread(); |
336 | RCU_TRACE(rcu_preempt_ctrlblk.n_exp_boosts++); | 313 | RCU_TRACE(rcu_preempt_ctrlblk.n_exp_boosts++); |
337 | } else | 314 | } else |
@@ -347,8 +324,6 @@ static void rcu_initiate_expedited_boost(void) | |||
347 | static void rcu_preempt_boost_start_gp(void) | 324 | static void rcu_preempt_boost_start_gp(void) |
348 | { | 325 | { |
349 | rcu_preempt_ctrlblk.boost_time = jiffies + RCU_BOOST_DELAY_JIFFIES; | 326 | rcu_preempt_ctrlblk.boost_time = jiffies + RCU_BOOST_DELAY_JIFFIES; |
350 | if (rcu_preempt_ctrlblk.boosted_this_gp > 0) | ||
351 | rcu_preempt_ctrlblk.boosted_this_gp = 0; | ||
352 | } | 327 | } |
353 | 328 | ||
354 | #else /* #ifdef CONFIG_RCU_BOOST */ | 329 | #else /* #ifdef CONFIG_RCU_BOOST */ |
@@ -934,8 +909,6 @@ static void rcu_initiate_boost_trace(void) | |||
934 | rcu_preempt_ctrlblk.n_normal_balk_gp_tasks++; | 909 | rcu_preempt_ctrlblk.n_normal_balk_gp_tasks++; |
935 | else if (rcu_preempt_ctrlblk.boost_tasks != NULL) | 910 | else if (rcu_preempt_ctrlblk.boost_tasks != NULL) |
936 | rcu_preempt_ctrlblk.n_normal_balk_boost_tasks++; | 911 | rcu_preempt_ctrlblk.n_normal_balk_boost_tasks++; |
937 | else if (rcu_preempt_ctrlblk.boosted_this_gp != 0) | ||
938 | rcu_preempt_ctrlblk.n_normal_balk_boosted++; | ||
939 | else if (!ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time)) | 912 | else if (!ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time)) |
940 | rcu_preempt_ctrlblk.n_normal_balk_notyet++; | 913 | rcu_preempt_ctrlblk.n_normal_balk_notyet++; |
941 | else | 914 | else |