]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
sched: Rely on synchronize_rcu_mult() de-duplication
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 28 Apr 2017 23:33:07 +0000 (16:33 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Jun 2017 15:25:39 +0000 (08:25 -0700)
The synchronize_rcu_mult() function now detects duplicate requests
for the same grace-period flavor and waits only once for each flavor.
This commit therefore removes the ugly #ifdef from sched_cpu_deactivate()
because synchronize_rcu_mult(call_rcu, call_rcu_sched) now does what
the #ifdef used to be needed for.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
kernel/sched/core.c

index 803c3bc274c4660bb672c2522331db967883aee4..e91138fcde8665c538eb52f237883e90fbaaa23a 100644 (file)
@@ -5874,15 +5874,9 @@ int sched_cpu_deactivate(unsigned int cpu)
         * users of this state to go away such that all new such users will
         * observe it.
         *
-        * For CONFIG_PREEMPT we have preemptible RCU and its sync_rcu() might
-        * not imply sync_sched(), so wait for both.
-        *
         * Do sync before park smpboot threads to take care the rcu boost case.
         */
-       if (IS_ENABLED(CONFIG_PREEMPT))
-               synchronize_rcu_mult(call_rcu, call_rcu_sched);
-       else
-               synchronize_rcu();
+       synchronize_rcu_mult(call_rcu, call_rcu_sched);
 
        if (!sched_smp_initialized)
                return 0;