Skip to content

Commit 7ecef08

Browse files
committed
rcu: Remove ->rgos_polled field from rcu_gp_oldstate structure
Because both normal and expedited grace periods increment their respective counters on their pre-scheduler early boot fastpaths, the rcu_gp_oldstate structure no longer needs its ->rgos_polled field. This commit therefore removes this field, shrinking this structure so that it is the same size as an rcu_head structure. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 43ff97c commit 7ecef08

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

include/linux/rcutree.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ bool rcu_gp_might_be_stalled(void);
4444
struct rcu_gp_oldstate {
4545
unsigned long rgos_norm;
4646
unsigned long rgos_exp;
47-
unsigned long rgos_polled;
4847
};
4948

5049
unsigned long start_poll_synchronize_rcu_expedited(void);

kernel/rcu/tree.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,7 +3526,6 @@ void get_completed_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp)
35263526
{
35273527
rgosp->rgos_norm = RCU_GET_STATE_COMPLETED;
35283528
rgosp->rgos_exp = RCU_GET_STATE_COMPLETED;
3529-
rgosp->rgos_polled = RCU_GET_STATE_COMPLETED;
35303529
}
35313530
EXPORT_SYMBOL_GPL(get_completed_synchronize_rcu_full);
35323531

@@ -3575,7 +3574,6 @@ void get_state_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp)
35753574
smp_mb(); /* ^^^ */
35763575
rgosp->rgos_norm = rcu_seq_snap(&rnp->gp_seq);
35773576
rgosp->rgos_exp = rcu_seq_snap(&rcu_state.expedited_sequence);
3578-
rgosp->rgos_polled = rcu_seq_snap(&rcu_state.gp_seq_polled);
35793577
}
35803578
EXPORT_SYMBOL_GPL(get_state_synchronize_rcu_full);
35813579

@@ -3727,9 +3725,7 @@ bool poll_state_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp)
37273725
if (rgosp->rgos_norm == RCU_GET_STATE_COMPLETED ||
37283726
rcu_seq_done_exact(&rnp->gp_seq, rgosp->rgos_norm) ||
37293727
rgosp->rgos_exp == RCU_GET_STATE_COMPLETED ||
3730-
rcu_seq_done_exact(&rcu_state.expedited_sequence, rgosp->rgos_exp) ||
3731-
rgosp->rgos_polled == RCU_GET_STATE_COMPLETED ||
3732-
rcu_seq_done_exact(&rcu_state.gp_seq_polled, rgosp->rgos_polled)) {
3728+
rcu_seq_done_exact(&rcu_state.expedited_sequence, rgosp->rgos_exp)) {
37333729
smp_mb(); /* Ensure GP ends before subsequent accesses. */
37343730
return true;
37353731
}

0 commit comments

Comments
 (0)