Skip to content

Commit 7570778

Browse files
Frederic Weisbeckerpaulmckrcu
authored andcommitted
srcu: Remove superfluous callbacks advancing from srcu_start_gp()
Callbacks advancing on SRCU must be performed on two specific places: 1) On enqueue time in order to make room for the acceleration of the new callback. 2) On invocation time in order to move the callbacks ready to invoke. Any other callback advancing callsite is needless. Remove the remaining one in srcu_gp_start(). Co-developed-by: Yong He <zhuangel570@gmail.com> Co-developed-by: Joel Fernandes <joel@joelfernandes.org> Co-developed-by: Neeraj upadhyay <neeraj.iitr10@gmail.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 5d573c1 commit 7570778

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

kernel/rcu/srcutree.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -772,20 +772,10 @@ EXPORT_SYMBOL_GPL(__srcu_read_unlock_nmisafe);
772772
*/
773773
static void srcu_gp_start(struct srcu_struct *ssp)
774774
{
775-
struct srcu_data *sdp;
776775
int state;
777776

778-
if (smp_load_acquire(&ssp->srcu_sup->srcu_size_state) < SRCU_SIZE_WAIT_BARRIER)
779-
sdp = per_cpu_ptr(ssp->sda, get_boot_cpu_id());
780-
else
781-
sdp = this_cpu_ptr(ssp->sda);
782777
lockdep_assert_held(&ACCESS_PRIVATE(ssp->srcu_sup, lock));
783778
WARN_ON_ONCE(ULONG_CMP_GE(ssp->srcu_sup->srcu_gp_seq, ssp->srcu_sup->srcu_gp_seq_needed));
784-
spin_lock_rcu_node(sdp); /* Interrupts already disabled. */
785-
rcu_segcblist_advance(&sdp->srcu_cblist,
786-
rcu_seq_current(&ssp->srcu_sup->srcu_gp_seq));
787-
WARN_ON_ONCE(!rcu_segcblist_segempty(&sdp->srcu_cblist, RCU_NEXT_TAIL));
788-
spin_unlock_rcu_node(sdp); /* Interrupts remain disabled. */
789779
WRITE_ONCE(ssp->srcu_sup->srcu_gp_start, jiffies);
790780
WRITE_ONCE(ssp->srcu_sup->srcu_n_exp_nodelay, 0);
791781
smp_mb(); /* Order prior store to ->srcu_gp_seq_needed vs. GP start. */

0 commit comments

Comments
 (0)