Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
sched: Rely on synchronize_rcu_mult() de-duplication
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
  • Loading branch information
paulmck authored and 0ctobot committed Jul 13, 2019
1 parent b7a6d12 commit fd0bf5c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -8058,15 +8058,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);

#ifdef CONFIG_SCHED_SMT
/*
Expand Down

0 comments on commit fd0bf5c

Please sign in to comment.