Commit cd920e5a authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Inline force_quiescent_state() into rcu_force_quiescent_state()

Given that rcu_force_quiescent_state() is a simple wrapper around
force_quiescent_state(), this commit saves a few lines of code by
inlining force_quiescent_state() into rcu_force_quiescent_state(),
and changing all references to force_quiescent_state() to instead
invoke rcu_force_quiescent_state().
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
parent 1de462ed
...@@ -479,7 +479,6 @@ module_param_cb(jiffies_till_next_fqs, &next_fqs_jiffies_ops, &jiffies_till_next ...@@ -479,7 +479,6 @@ module_param_cb(jiffies_till_next_fqs, &next_fqs_jiffies_ops, &jiffies_till_next
module_param(rcu_kick_kthreads, bool, 0644); module_param(rcu_kick_kthreads, bool, 0644);
static void force_qs_rnp(int (*f)(struct rcu_data *rdp)); static void force_qs_rnp(int (*f)(struct rcu_data *rdp));
static void force_quiescent_state(void);
static int rcu_pending(void); static int rcu_pending(void);
/* /*
...@@ -503,15 +502,6 @@ unsigned long rcu_exp_batches_completed(void) ...@@ -503,15 +502,6 @@ unsigned long rcu_exp_batches_completed(void)
} }
EXPORT_SYMBOL_GPL(rcu_exp_batches_completed); EXPORT_SYMBOL_GPL(rcu_exp_batches_completed);
/*
* Force a quiescent state.
*/
void rcu_force_quiescent_state(void)
{
force_quiescent_state();
}
EXPORT_SYMBOL_GPL(rcu_force_quiescent_state);
/* /*
* Convert a ->gp_state value to a character string. * Convert a ->gp_state value to a character string.
*/ */
...@@ -1310,7 +1300,7 @@ static void print_other_cpu_stall(unsigned long gp_seq) ...@@ -1310,7 +1300,7 @@ static void print_other_cpu_stall(unsigned long gp_seq)
panic_on_rcu_stall(); panic_on_rcu_stall();
force_quiescent_state(); /* Kick them all. */ rcu_force_quiescent_state(); /* Kick them all. */
} }
static void print_cpu_stall(void) static void print_cpu_stall(void)
...@@ -2578,7 +2568,7 @@ static void force_qs_rnp(int (*f)(struct rcu_data *rdp)) ...@@ -2578,7 +2568,7 @@ static void force_qs_rnp(int (*f)(struct rcu_data *rdp))
* Force quiescent states on reluctant CPUs, and also detect which * Force quiescent states on reluctant CPUs, and also detect which
* CPUs are in dyntick-idle mode. * CPUs are in dyntick-idle mode.
*/ */
static void force_quiescent_state(void) void rcu_force_quiescent_state(void)
{ {
unsigned long flags; unsigned long flags;
bool ret; bool ret;
...@@ -2610,6 +2600,7 @@ static void force_quiescent_state(void) ...@@ -2610,6 +2600,7 @@ static void force_quiescent_state(void)
raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags); raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags);
rcu_gp_kthread_wake(); rcu_gp_kthread_wake();
} }
EXPORT_SYMBOL_GPL(rcu_force_quiescent_state);
/* /*
* This function checks for grace-period requests that fail to motivate * This function checks for grace-period requests that fail to motivate
...@@ -2801,9 +2792,9 @@ static void __call_rcu_core(struct rcu_data *rdp, struct rcu_head *head, ...@@ -2801,9 +2792,9 @@ static void __call_rcu_core(struct rcu_data *rdp, struct rcu_head *head,
/* /*
* Force the grace period if too many callbacks or too long waiting. * Force the grace period if too many callbacks or too long waiting.
* Enforce hysteresis, and don't invoke force_quiescent_state() * Enforce hysteresis, and don't invoke rcu_force_quiescent_state()
* if some other CPU has recently done so. Also, don't bother * if some other CPU has recently done so. Also, don't bother
* invoking force_quiescent_state() if the newly enqueued callback * invoking rcu_force_quiescent_state() if the newly enqueued callback
* is the only one waiting for a grace period to complete. * is the only one waiting for a grace period to complete.
*/ */
if (unlikely(rcu_segcblist_n_cbs(&rdp->cblist) > if (unlikely(rcu_segcblist_n_cbs(&rdp->cblist) >
...@@ -2820,7 +2811,7 @@ static void __call_rcu_core(struct rcu_data *rdp, struct rcu_head *head, ...@@ -2820,7 +2811,7 @@ static void __call_rcu_core(struct rcu_data *rdp, struct rcu_head *head,
rdp->blimit = LONG_MAX; rdp->blimit = LONG_MAX;
if (rcu_state.n_force_qs == rdp->n_force_qs_snap && if (rcu_state.n_force_qs == rdp->n_force_qs_snap &&
rcu_segcblist_first_pend_cb(&rdp->cblist) != head) rcu_segcblist_first_pend_cb(&rdp->cblist) != head)
force_quiescent_state(); rcu_force_quiescent_state();
rdp->n_force_qs_snap = rcu_state.n_force_qs; rdp->n_force_qs_snap = rcu_state.n_force_qs;
rdp->qlen_last_fqs_check = rcu_segcblist_n_cbs(&rdp->cblist); rdp->qlen_last_fqs_check = rcu_segcblist_n_cbs(&rdp->cblist);
} }
......
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