Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9e8afb8 authored by Kaushal Kumar's avatar Kaushal Kumar Committed by Kyle Yan
Browse files

sched: Remove synchronize rcu/sched calls from _cpu_down



There is no need for sync_sched() in _cpu_down as stop_machine()
provides that barrier implicitly. Removing it also helps improve
hot-unplug latency.

The sync_sched/rcu were earlier removed for the same reason by the
commit 9ee349ad ("sched: Fix set_cpu_active() in cpu_down()"),
but recently got added as part of commit <6acce3ef> ("sched:
Remove get_online_cpus() usage.").

CRs-Fixed: 2044149
Change-Id: I97763004454d082d3cc2d9d9dbef7da923608600
Signed-off-by: default avatarKaushal Kumar <kaushalk@codeaurora.org>
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
Signed-off-by: default avatarTrilok Soni <tsoni@codeaurora.org>
parent a3ba7da6
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -8052,20 +8052,6 @@ int sched_cpu_deactivate(unsigned int cpu)
	int ret;

	set_cpu_active(cpu, false);
	/*
	 * We've cleared cpu_active_mask, wait for all preempt-disabled and RCU
	 * 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();

	if (!sched_smp_initialized)
		return 0;