Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aff12cdf authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu: Consolidate expedited GP code into exp_funnel_lock()



This commit pulls the grace-period-start counter adjustment and tracing
from synchronize_rcu_expedited() and synchronize_sched_expedited()
into exp_funnel_lock(), thus eliminating some code duplication.

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 179e5dcd
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3653,6 +3653,8 @@ static bool exp_funnel_lock(struct rcu_state *rsp, unsigned long s)
		mutex_unlock(&rsp->exp_mutex);
		return true;
	}
	rcu_exp_gp_seq_start(rsp);
	trace_rcu_exp_grace_period(rsp->name, s, TPS("start"));
	return false;
}

@@ -3905,9 +3907,6 @@ void synchronize_sched_expedited(void)
	if (exp_funnel_lock(rsp, s))
		return;  /* Someone else did our work for us. */

	rcu_exp_gp_seq_start(rsp);
	trace_rcu_exp_grace_period(rsp->name, s, TPS("start"));

	/* Initialize the rcu_node tree in preparation for the wait. */
	sync_rcu_exp_select_cpus(rsp, sync_sched_exp_handler);

+0 −3
Original line number Diff line number Diff line
@@ -751,9 +751,6 @@ void synchronize_rcu_expedited(void)
	if (exp_funnel_lock(rsp, s))
		return;  /* Someone else did our work for us. */

	rcu_exp_gp_seq_start(rsp);
	trace_rcu_exp_grace_period(rsp->name, s, TPS("start"));

	/* Initialize the rcu_node tree in preparation for the wait. */
	sync_rcu_exp_select_cpus(rsp, sync_rcu_exp_handler);