Skip to content

Commit 6e16b0f

Browse files
Frederic Weisbeckerpaulmckrcu
authored andcommitted
rcu: Move rcu_data.cpu_no_qs.b.exp reset to rcu_export_exp_rdp()
On non-preemptible RCU, move clearing of the rcu_data structure's ->cpu_no_qs.b.exp filed to the actual expedited quiescent state report function, matching hw preemptible RCU handles the ->exp_deferred_qs field. This prepares for removing ->exp_deferred_qs in favor of ->cpu_no_qs.b.exp for both preemptible and non-preemptible RCU. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent a438265 commit 6e16b0f

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

kernel/rcu/tree_exp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ static void rcu_report_exp_cpu_mult(struct rcu_node *rnp,
256256
static void rcu_report_exp_rdp(struct rcu_data *rdp)
257257
{
258258
WRITE_ONCE(rdp->exp_deferred_qs, false);
259+
WRITE_ONCE(rdp->cpu_no_qs.b.exp, false);
259260
rcu_report_exp_cpu_mult(rdp->mynode, rdp->grpmask, true);
260261
}
261262

kernel/rcu/tree_plugin.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,8 @@ static void rcu_qs(void)
849849
trace_rcu_grace_period(TPS("rcu_sched"),
850850
__this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
851851
__this_cpu_write(rcu_data.cpu_no_qs.b.norm, false);
852-
if (!__this_cpu_read(rcu_data.cpu_no_qs.b.exp))
853-
return;
854-
__this_cpu_write(rcu_data.cpu_no_qs.b.exp, false);
855-
rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
852+
if (__this_cpu_read(rcu_data.cpu_no_qs.b.exp))
853+
rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
856854
}
857855

858856
/*

0 commit comments

Comments
 (0)