mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: Remove synchronize rcu/sched calls from _cpu_down
@ 2014-07-25 11:56 Kaushal Kumar
  2014-07-25 12:44 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Kaushal Kumar @ 2014-07-25 11:56 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Michael Wang, Arun Bharadwaj
  Cc: linux-kernel, linux-arm-msm, Kaushal Kumar

synchronize_rcu calls fail hot-unplug latency tests since
wait_rcu_gp can have very high latency, at times up to few
hundred of millisecs.

These calls were earlier removed for the same reason by the
commit 9ee349ad6d326df3633d43f54202427295999c47, but got added
back as part of commit c4575f83b9fe87bb57b737bc8a667f746a20320a.

Moreover there should be no need for sync_sched() in _cpu_down
as stop_machine() provides that barrier implicitly.

Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
---
 kernel/cpu.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 887eb32..93e526c 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -311,28 +311,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
 				__func__, cpu);
 		goto out_release;
 	}
-
-	/*
-	 * By now 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 explicitly call both.
-	 *
-	 * Do sync before park smpboot threads to take care the rcu boost case.
-	 */
-#ifdef CONFIG_PREEMPT
-	synchronize_sched();
-#endif
-	synchronize_rcu();
-
 	smpboot_park_threads(cpu);

-	/*
-	 * So now all preempt/rcu users must observe !cpu_active().
-	 */
-
 	err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu));
 	if (err) {
 		/* CPU didn't die: tell everyone.  Can't complain. */
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sched: Remove synchronize rcu/sched calls from _cpu_down
  2014-07-25 11:56 [PATCH] sched: Remove synchronize rcu/sched calls from _cpu_down Kaushal Kumar
@ 2014-07-25 12:44 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2014-07-25 12:44 UTC (permalink / raw)
  To: Kaushal Kumar
  Cc: Ingo Molnar, Michael Wang, Arun Bharadwaj, linux-kernel, linux-arm-msm

On Fri, Jul 25, 2014 at 05:26:08PM +0530, Kaushal Kumar wrote:
> synchronize_rcu calls fail hot-unplug latency tests since
> wait_rcu_gp can have very high latency, at times up to few
> hundred of millisecs.

So bloody what?

> These calls were earlier removed for the same reason by the
> commit 9ee349ad6d326df3633d43f54202427295999c47, but got added
> back as part of commit c4575f83b9fe87bb57b737bc8a667f746a20320a.

fatal: bad object c4575f83b9fe87bb57b737bc8a667f746a20320

> Moreover there should be no need for sync_sched() in _cpu_down
> as stop_machine() provides that barrier implicitly.

We should not rely on that, but also you've removed synchronize_rcu()
and this is not at all provided by stop_machine().

So NAK.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-25 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 11:56 [PATCH] sched: Remove synchronize rcu/sched calls from _cpu_down Kaushal Kumar
2014-07-25 12:44 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome