Skip to content

Commit 1bb3364

Browse files
author
Paul E. McKenney
committed
rcu: Rename rcu_data's ->deferred_qs to ->exp_deferred_qs
The rcu_data structure's ->deferred_qs field is used to indicate that the current CPU is blocking an expedited grace period (perhaps a future one). Given that it is used only for expedited grace periods, its current name is misleading, so this commit renames it to ->exp_deferred_qs. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
1 parent eddded8 commit 1bb3364

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎kernel/rcu/tree.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ struct rcu_data {
154154
bool core_needs_qs; /* Core waits for quiesc state. */
155155
bool beenonline; /* CPU online at least once. */
156156
bool gpwrap; /* Possible ->gp_seq wrap. */
157-
bool deferred_qs; /* This CPU awaiting a deferred QS? */
157+
bool exp_deferred_qs; /* This CPU awaiting a deferred QS? */
158158
struct rcu_node *mynode; /* This CPU's leaf of hierarchy */
159159
unsigned long grpmask; /* Mask to apply to leaf qsmask. */
160160
unsigned long ticks_this_gp; /* The number of scheduling-clock */

‎kernel/rcu/tree_exp.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static void rcu_report_exp_cpu_mult(struct rcu_node *rnp,
250250
*/
251251
static void rcu_report_exp_rdp(struct rcu_data *rdp)
252252
{
253-
WRITE_ONCE(rdp->deferred_qs, false);
253+
WRITE_ONCE(rdp->exp_deferred_qs, false);
254254
rcu_report_exp_cpu_mult(rdp->mynode, rdp->grpmask, true);
255255
}
256256

@@ -616,7 +616,7 @@ static void rcu_exp_handler(void *unused)
616616
rcu_dynticks_curr_cpu_in_eqs()) {
617617
rcu_report_exp_rdp(rdp);
618618
} else {
619-
rdp->deferred_qs = true;
619+
rdp->exp_deferred_qs = true;
620620
set_tsk_need_resched(t);
621621
set_preempt_need_resched();
622622
}
@@ -638,7 +638,7 @@ static void rcu_exp_handler(void *unused)
638638
if (t->rcu_read_lock_nesting > 0) {
639639
raw_spin_lock_irqsave_rcu_node(rnp, flags);
640640
if (rnp->expmask & rdp->grpmask) {
641-
rdp->deferred_qs = true;
641+
rdp->exp_deferred_qs = true;
642642
t->rcu_read_unlock_special.b.exp_hint = true;
643643
}
644644
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
@@ -661,7 +661,7 @@ static void rcu_exp_handler(void *unused)
661661
*
662662
* Otherwise, force a context switch after the CPU enables everything.
663663
*/
664-
rdp->deferred_qs = true;
664+
rdp->exp_deferred_qs = true;
665665
if (!(preempt_count() & (PREEMPT_MASK | SOFTIRQ_MASK)) ||
666666
WARN_ON_ONCE(rcu_dynticks_curr_cpu_in_eqs())) {
667667
rcu_preempt_deferred_qs(t);

‎kernel/rcu/tree_plugin.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp)
237237
* no need to check for a subsequent expedited GP. (Though we are
238238
* still in a quiescent state in any case.)
239239
*/
240-
if (blkd_state & RCU_EXP_BLKD && rdp->deferred_qs)
240+
if (blkd_state & RCU_EXP_BLKD && rdp->exp_deferred_qs)
241241
rcu_report_exp_rdp(rdp);
242242
else
243-
WARN_ON_ONCE(rdp->deferred_qs);
243+
WARN_ON_ONCE(rdp->exp_deferred_qs);
244244
}
245245

246246
/*
@@ -337,7 +337,7 @@ void rcu_note_context_switch(bool preempt)
337337
* means that we continue to block the current grace period.
338338
*/
339339
rcu_qs();
340-
if (rdp->deferred_qs)
340+
if (rdp->exp_deferred_qs)
341341
rcu_report_exp_rdp(rdp);
342342
trace_rcu_utilization(TPS("End context switch"));
343343
barrier(); /* Avoid RCU read-side critical sections leaking up. */
@@ -451,15 +451,15 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
451451
*/
452452
special = t->rcu_read_unlock_special;
453453
rdp = this_cpu_ptr(&rcu_data);
454-
if (!special.s && !rdp->deferred_qs) {
454+
if (!special.s && !rdp->exp_deferred_qs) {
455455
local_irq_restore(flags);
456456
return;
457457
}
458458
t->rcu_read_unlock_special.b.deferred_qs = false;
459459
if (special.b.need_qs) {
460460
rcu_qs();
461461
t->rcu_read_unlock_special.b.need_qs = false;
462-
if (!t->rcu_read_unlock_special.s && !rdp->deferred_qs) {
462+
if (!t->rcu_read_unlock_special.s && !rdp->exp_deferred_qs) {
463463
local_irq_restore(flags);
464464
return;
465465
}
@@ -471,7 +471,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
471471
* tasks are handled when removing the task from the
472472
* blocked-tasks list below.
473473
*/
474-
if (rdp->deferred_qs) {
474+
if (rdp->exp_deferred_qs) {
475475
rcu_report_exp_rdp(rdp);
476476
if (!t->rcu_read_unlock_special.s) {
477477
local_irq_restore(flags);
@@ -560,7 +560,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
560560
*/
561561
static bool rcu_preempt_need_deferred_qs(struct task_struct *t)
562562
{
563-
return (__this_cpu_read(rcu_data.deferred_qs) ||
563+
return (__this_cpu_read(rcu_data.exp_deferred_qs) ||
564564
READ_ONCE(t->rcu_read_unlock_special.s)) &&
565565
t->rcu_read_lock_nesting <= 0;
566566
}

0 commit comments

Comments
 (0)