Skip to content

Commit 6c7d7db

Browse files
committed
rcu: Rename sync_rcu_preempt_exp_done() to sync_rcu_exp_done()
Now that the RCU flavors have been consolidated, there is one common function for checking to see if an expedited RCU grace period has completed, namely sync_rcu_preempt_exp_done(). Because this function is no longer specific to RCU-preempt, this commit removes the "_preempt" from its name. This commit also changes sync_rcu_preempt_exp_done_unlocked() to sync_rcu_exp_done_unlocked() for the same reason. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 4bc6b74 commit 6c7d7db

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

kernel/rcu/tree_exp.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static void __maybe_unused sync_exp_reset_tree(void)
148148
*
149149
* Caller must hold the specificed rcu_node structure's ->lock
150150
*/
151-
static bool sync_rcu_preempt_exp_done(struct rcu_node *rnp)
151+
static bool sync_rcu_exp_done(struct rcu_node *rnp)
152152
{
153153
raw_lockdep_assert_held_rcu_node(rnp);
154154

@@ -157,17 +157,16 @@ static bool sync_rcu_preempt_exp_done(struct rcu_node *rnp)
157157
}
158158

159159
/*
160-
* Like sync_rcu_preempt_exp_done(), but this function assumes the caller
161-
* doesn't hold the rcu_node's ->lock, and will acquire and release the lock
162-
* itself
160+
* Like sync_rcu_exp_done(), but this function assumes the caller doesn't
161+
* hold the rcu_node's ->lock, and will acquire and release the lock itself
163162
*/
164-
static bool sync_rcu_preempt_exp_done_unlocked(struct rcu_node *rnp)
163+
static bool sync_rcu_exp_done_unlocked(struct rcu_node *rnp)
165164
{
166165
unsigned long flags;
167166
bool ret;
168167

169168
raw_spin_lock_irqsave_rcu_node(rnp, flags);
170-
ret = sync_rcu_preempt_exp_done(rnp);
169+
ret = sync_rcu_exp_done(rnp);
171170
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
172171

173172
return ret;
@@ -191,7 +190,7 @@ static void __rcu_report_exp_rnp(struct rcu_node *rnp,
191190
unsigned long mask;
192191

193192
for (;;) {
194-
if (!sync_rcu_preempt_exp_done(rnp)) {
193+
if (!sync_rcu_exp_done(rnp)) {
195194
if (!rnp->expmask)
196195
rcu_initiate_boost(rnp, flags);
197196
else
@@ -471,9 +470,9 @@ static void synchronize_sched_expedited_wait(void)
471470
for (;;) {
472471
ret = swait_event_timeout_exclusive(
473472
rcu_state.expedited_wq,
474-
sync_rcu_preempt_exp_done_unlocked(rnp_root),
473+
sync_rcu_exp_done_unlocked(rnp_root),
475474
jiffies_stall);
476-
if (ret > 0 || sync_rcu_preempt_exp_done_unlocked(rnp_root))
475+
if (ret > 0 || sync_rcu_exp_done_unlocked(rnp_root))
477476
return;
478477
WARN_ON(ret < 0); /* workqueues should not be signaled. */
479478
if (rcu_cpu_stall_suppress)
@@ -507,7 +506,7 @@ static void synchronize_sched_expedited_wait(void)
507506
rcu_for_each_node_breadth_first(rnp) {
508507
if (rnp == rnp_root)
509508
continue; /* printed unconditionally */
510-
if (sync_rcu_preempt_exp_done_unlocked(rnp))
509+
if (sync_rcu_exp_done_unlocked(rnp))
511510
continue;
512511
pr_cont(" l=%u:%d-%d:%#lx/%c",
513512
rnp->level, rnp->grplo, rnp->grphi,

kernel/rcu/tree_plugin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
485485
empty_norm = !rcu_preempt_blocked_readers_cgp(rnp);
486486
WARN_ON_ONCE(rnp->completedqs == rnp->gp_seq &&
487487
(!empty_norm || rnp->qsmask));
488-
empty_exp = sync_rcu_preempt_exp_done(rnp);
488+
empty_exp = sync_rcu_exp_done(rnp);
489489
smp_mb(); /* ensure expedited fastpath sees end of RCU c-s. */
490490
np = rcu_next_node_entry(t, rnp);
491491
list_del_init(&t->rcu_node_entry);
@@ -509,7 +509,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
509509
* Note that rcu_report_unblock_qs_rnp() releases rnp->lock,
510510
* so we must take a snapshot of the expedited state.
511511
*/
512-
empty_exp_now = sync_rcu_preempt_exp_done(rnp);
512+
empty_exp_now = sync_rcu_exp_done(rnp);
513513
if (!empty_norm && !rcu_preempt_blocked_readers_cgp(rnp)) {
514514
trace_rcu_quiescent_state_report(TPS("preempt_rcu"),
515515
rnp->gp_seq,

0 commit comments

Comments
 (0)