File tree Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -703,21 +703,6 @@ static int takedown_cpu(unsigned int cpu)
703703 struct cpuhp_cpu_state * st = per_cpu_ptr (& cpuhp_state , cpu );
704704 int err ;
705705
706- /*
707- * By now we've cleared cpu_active_mask, wait for all preempt-disabled
708- * and RCU users of this state to go away such that all new such users
709- * will observe it.
710- *
711- * For CONFIG_PREEMPT we have preemptible RCU and its sync_rcu() might
712- * not imply sync_sched(), so wait for both.
713- *
714- * Do sync before park smpboot threads to take care the rcu boost case.
715- */
716- if (IS_ENABLED (CONFIG_PREEMPT ))
717- synchronize_rcu_mult (call_rcu , call_rcu_sched );
718- else
719- synchronize_rcu ();
720-
721706 /* Park the smpboot threads */
722707 kthread_park (per_cpu_ptr (& cpuhp_state , cpu )-> thread );
723708 smpboot_park_threads (cpu );
Original file line number Diff line number Diff line change @@ -7112,6 +7112,20 @@ int sched_cpu_deactivate(unsigned int cpu)
71127112 int ret ;
71137113
71147114 set_cpu_active (cpu , false);
7115+ /*
7116+ * We've cleared cpu_active_mask, wait for all preempt-disabled and RCU
7117+ * users of this state to go away such that all new such users will
7118+ * observe it.
7119+ *
7120+ * For CONFIG_PREEMPT we have preemptible RCU and its sync_rcu() might
7121+ * not imply sync_sched(), so wait for both.
7122+ *
7123+ * Do sync before park smpboot threads to take care the rcu boost case.
7124+ */
7125+ if (IS_ENABLED (CONFIG_PREEMPT ))
7126+ synchronize_rcu_mult (call_rcu , call_rcu_sched );
7127+ else
7128+ synchronize_rcu ();
71157129
71167130 if (!sched_smp_initialized )
71177131 return 0 ;
You can’t perform that action at this time.
0 commit comments