Commit 203373c8 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Paul E. McKenney

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: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent ddeb7581
...@@ -100,7 +100,6 @@ struct rcu_preempt_ctrlblk { ...@@ -100,7 +100,6 @@ struct rcu_preempt_ctrlblk {
u8 completed; /* Last grace period completed. */ u8 completed; /* Last grace period completed. */
/* If all three are equal, RCU is idle. */ /* If all three are equal, RCU is idle. */
#ifdef CONFIG_RCU_BOOST #ifdef CONFIG_RCU_BOOST
s8 boosted_this_gp; /* Has boosting already happened? */
unsigned long boost_time; /* When to start boosting (jiffies) */ unsigned long boost_time; /* When to start boosting (jiffies) */
#endif /* #ifdef CONFIG_RCU_BOOST */ #endif /* #ifdef CONFIG_RCU_BOOST */
#ifdef CONFIG_RCU_TRACE #ifdef CONFIG_RCU_TRACE
...@@ -112,7 +111,6 @@ struct rcu_preempt_ctrlblk { ...@@ -112,7 +111,6 @@ struct rcu_preempt_ctrlblk {
unsigned long n_normal_balk_blkd_tasks; unsigned long n_normal_balk_blkd_tasks;
unsigned long n_normal_balk_gp_tasks; unsigned long n_normal_balk_gp_tasks;
unsigned long n_normal_balk_boost_tasks; unsigned long n_normal_balk_boost_tasks;
unsigned long n_normal_balk_boosted;
unsigned long n_normal_balk_notyet; unsigned long n_normal_balk_notyet;
unsigned long n_normal_balk_nos; unsigned long n_normal_balk_nos;
unsigned long n_exp_balk_blkd_tasks; unsigned long n_exp_balk_blkd_tasks;
...@@ -219,36 +217,19 @@ static void show_tiny_preempt_stats(struct seq_file *m) ...@@ -219,36 +217,19 @@ static void show_tiny_preempt_stats(struct seq_file *m)
"N."[!rcu_preempt_ctrlblk.gp_tasks], "N."[!rcu_preempt_ctrlblk.gp_tasks],
"E."[!rcu_preempt_ctrlblk.exp_tasks]); "E."[!rcu_preempt_ctrlblk.exp_tasks]);
#ifdef CONFIG_RCU_BOOST #ifdef CONFIG_RCU_BOOST
seq_printf(m, " ttb=%c btg=", seq_printf(m, "%sttb=%c ntb=%lu neb=%lu nnb=%lu j=%04x bt=%04x\n",
"B."[!rcu_preempt_ctrlblk.boost_tasks]); " ",
switch (rcu_preempt_ctrlblk.boosted_this_gp) { "B."[!rcu_preempt_ctrlblk.boost_tasks],
case -1:
seq_puts(m, "exp");
break;
case 0:
seq_puts(m, "no");
break;
case 1:
seq_puts(m, "begun");
break;
case 2:
seq_puts(m, "done");
break;
default:
seq_printf(m, "?%d?", rcu_preempt_ctrlblk.boosted_this_gp);
}
seq_printf(m, " ntb=%lu neb=%lu nnb=%lu j=%04x bt=%04x\n",
rcu_preempt_ctrlblk.n_tasks_boosted, rcu_preempt_ctrlblk.n_tasks_boosted,
rcu_preempt_ctrlblk.n_exp_boosts, rcu_preempt_ctrlblk.n_exp_boosts,
rcu_preempt_ctrlblk.n_normal_boosts, rcu_preempt_ctrlblk.n_normal_boosts,
(int)(jiffies & 0xffff), (int)(jiffies & 0xffff),
(int)(rcu_preempt_ctrlblk.boost_time & 0xffff)); (int)(rcu_preempt_ctrlblk.boost_time & 0xffff));
seq_printf(m, " %s: nt=%lu gt=%lu bt=%lu b=%lu ny=%lu nos=%lu\n", seq_printf(m, " %s: nt=%lu gt=%lu bt=%lu ny=%lu nos=%lu\n",
"normal balk", "normal balk",
rcu_preempt_ctrlblk.n_normal_balk_blkd_tasks, rcu_preempt_ctrlblk.n_normal_balk_blkd_tasks,
rcu_preempt_ctrlblk.n_normal_balk_gp_tasks, rcu_preempt_ctrlblk.n_normal_balk_gp_tasks,
rcu_preempt_ctrlblk.n_normal_balk_boost_tasks, rcu_preempt_ctrlblk.n_normal_balk_boost_tasks,
rcu_preempt_ctrlblk.n_normal_balk_boosted,
rcu_preempt_ctrlblk.n_normal_balk_notyet, rcu_preempt_ctrlblk.n_normal_balk_notyet,
rcu_preempt_ctrlblk.n_normal_balk_nos); rcu_preempt_ctrlblk.n_normal_balk_nos);
seq_printf(m, " exp balk: bt=%lu nos=%lu\n", seq_printf(m, " exp balk: bt=%lu nos=%lu\n",
...@@ -277,7 +258,6 @@ static int rcu_boost(void) ...@@ -277,7 +258,6 @@ static int rcu_boost(void)
if (rcu_preempt_ctrlblk.boost_tasks == NULL) if (rcu_preempt_ctrlblk.boost_tasks == NULL)
return 0; /* Nothing to boost. */ return 0; /* Nothing to boost. */
raw_local_irq_save(flags); raw_local_irq_save(flags);
rcu_preempt_ctrlblk.boosted_this_gp++;
t = container_of(rcu_preempt_ctrlblk.boost_tasks, struct task_struct, t = container_of(rcu_preempt_ctrlblk.boost_tasks, struct task_struct,
rcu_node_entry); rcu_node_entry);
np = rcu_next_node_entry(t); np = rcu_next_node_entry(t);
...@@ -287,7 +267,6 @@ static int rcu_boost(void) ...@@ -287,7 +267,6 @@ static int rcu_boost(void)
raw_local_irq_restore(flags); raw_local_irq_restore(flags);
rt_mutex_lock(&mtx); rt_mutex_lock(&mtx);
RCU_TRACE(rcu_preempt_ctrlblk.n_tasks_boosted++); RCU_TRACE(rcu_preempt_ctrlblk.n_tasks_boosted++);
rcu_preempt_ctrlblk.boosted_this_gp++;
rt_mutex_unlock(&mtx); rt_mutex_unlock(&mtx);
return rcu_preempt_ctrlblk.boost_tasks != NULL; return rcu_preempt_ctrlblk.boost_tasks != NULL;
} }
...@@ -310,7 +289,6 @@ static int rcu_initiate_boost(void) ...@@ -310,7 +289,6 @@ static int rcu_initiate_boost(void)
} }
if (rcu_preempt_ctrlblk.gp_tasks != NULL && if (rcu_preempt_ctrlblk.gp_tasks != NULL &&
rcu_preempt_ctrlblk.boost_tasks == NULL && rcu_preempt_ctrlblk.boost_tasks == NULL &&
rcu_preempt_ctrlblk.boosted_this_gp == 0 &&
ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time)) { ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time)) {
rcu_preempt_ctrlblk.boost_tasks = rcu_preempt_ctrlblk.gp_tasks; rcu_preempt_ctrlblk.boost_tasks = rcu_preempt_ctrlblk.gp_tasks;
invoke_rcu_kthread(); invoke_rcu_kthread();
...@@ -331,7 +309,6 @@ static void rcu_initiate_expedited_boost(void) ...@@ -331,7 +309,6 @@ static void rcu_initiate_expedited_boost(void)
if (!list_empty(&rcu_preempt_ctrlblk.blkd_tasks)) { if (!list_empty(&rcu_preempt_ctrlblk.blkd_tasks)) {
rcu_preempt_ctrlblk.boost_tasks = rcu_preempt_ctrlblk.boost_tasks =
rcu_preempt_ctrlblk.blkd_tasks.next; rcu_preempt_ctrlblk.blkd_tasks.next;
rcu_preempt_ctrlblk.boosted_this_gp = -1;
invoke_rcu_kthread(); invoke_rcu_kthread();
RCU_TRACE(rcu_preempt_ctrlblk.n_exp_boosts++); RCU_TRACE(rcu_preempt_ctrlblk.n_exp_boosts++);
} else } else
...@@ -347,8 +324,6 @@ static void rcu_initiate_expedited_boost(void) ...@@ -347,8 +324,6 @@ static void rcu_initiate_expedited_boost(void)
static void rcu_preempt_boost_start_gp(void) static void rcu_preempt_boost_start_gp(void)
{ {
rcu_preempt_ctrlblk.boost_time = jiffies + RCU_BOOST_DELAY_JIFFIES; rcu_preempt_ctrlblk.boost_time = jiffies + RCU_BOOST_DELAY_JIFFIES;
if (rcu_preempt_ctrlblk.boosted_this_gp > 0)
rcu_preempt_ctrlblk.boosted_this_gp = 0;
} }
#else /* #ifdef CONFIG_RCU_BOOST */ #else /* #ifdef CONFIG_RCU_BOOST */
...@@ -934,8 +909,6 @@ static void rcu_initiate_boost_trace(void) ...@@ -934,8 +909,6 @@ static void rcu_initiate_boost_trace(void)
rcu_preempt_ctrlblk.n_normal_balk_gp_tasks++; rcu_preempt_ctrlblk.n_normal_balk_gp_tasks++;
else if (rcu_preempt_ctrlblk.boost_tasks != NULL) else if (rcu_preempt_ctrlblk.boost_tasks != NULL)
rcu_preempt_ctrlblk.n_normal_balk_boost_tasks++; rcu_preempt_ctrlblk.n_normal_balk_boost_tasks++;
else if (rcu_preempt_ctrlblk.boosted_this_gp != 0)
rcu_preempt_ctrlblk.n_normal_balk_boosted++;
else if (!ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time)) else if (!ULONG_CMP_GE(jiffies, rcu_preempt_ctrlblk.boost_time))
rcu_preempt_ctrlblk.n_normal_balk_notyet++; rcu_preempt_ctrlblk.n_normal_balk_notyet++;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment