History

rcu: Stop excluding CPU hotplug in synchronize_sched_expedited()

Now that synchronize_sched_expedited() uses IPIs, a hook in rcu_sched_qs(), and the ->expmask field in the rcu_node combining tree, it is no longer necessary to exclude CPU hotplug. Any races with CPU hotplug will be detected when attempting to send the IPI. This commit therefore removes the code excluding CPU hotplug operations.

Paul E. McKenney committed 11 years ago

Commit 807226e1 parent 83c2c731 file · +1 −13Browse files

Unified · Split

kernel/rcu/tree.c+1−13
@@ -3785,19 +3785,9 @@ void synchronize_sched_expedited(void) · 3784 unmodified lines
3785 /* Take a snapshot of the sequence number. */3785 /* Take a snapshot of the sequence number. */
3786 s = rcu_exp_gp_seq_snap(rsp);3786 s = rcu_exp_gp_seq_snap(rsp);
3787 3787
3788 if (!try_get_online_cpus()) {
3789 /* CPU hotplug operation in flight, fall back to normal GP. */
3790 wait_rcu_gp(call_rcu_sched);
3791 atomic_long_inc(&rsp->expedited_normal);
3792 return;
3793 }
3794 WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
3795
3796 rnp = exp_funnel_lock(rsp, s);3788 rnp = exp_funnel_lock(rsp, s);
3797 if (rnp == NULL) {3789 if (rnp == NULL)
3798 put_online_cpus();
3799 return; /* Someone else did our work for us. */3790 return; /* Someone else did our work for us. */
3800 }
3801 3791
3802 rcu_exp_gp_seq_start(rsp);3792 rcu_exp_gp_seq_start(rsp);
3803 sync_sched_exp_select_cpus(rsp);3793 sync_sched_exp_select_cpus(rsp);
@@ -3805,8 +3795,6 @@ void synchronize_sched_expedited(void) · 1 unmodified line
3805 3795
3806 rcu_exp_gp_seq_end(rsp);3796 rcu_exp_gp_seq_end(rsp);
3807 mutex_unlock(&rnp->exp_funnel_mutex);3797 mutex_unlock(&rnp->exp_funnel_mutex);
3808
3809 put_online_cpus();
3810}3798}
3811EXPORT_SYMBOL_GPL(synchronize_sched_expedited);3799EXPORT_SYMBOL_GPL(synchronize_sched_expedited);
3812 3800

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t