提交 779de6ce 编写于 作者: P Paul E. McKenney

cpu: Wait for RCU grace periods concurrently

In kernels built with CONFIG_PREEMPT, _cpu_down() waits for RCU and
RCU-sched grace periods back-to-back, incurring quite a bit more latency
than required.  This commit therefore uses the new synchronize_rcu_mult()
to allow waiting for both grace periods concurrently.
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
上级 ec90a194
...@@ -380,14 +380,14 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) ...@@ -380,14 +380,14 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
* will observe it. * will observe it.
* *
* For CONFIG_PREEMPT we have preemptible RCU and its sync_rcu() might * For CONFIG_PREEMPT we have preemptible RCU and its sync_rcu() might
* not imply sync_sched(), so explicitly call both. * not imply sync_sched(), so wait for both.
* *
* Do sync before park smpboot threads to take care the rcu boost case. * Do sync before park smpboot threads to take care the rcu boost case.
*/ */
#ifdef CONFIG_PREEMPT if (IS_ENABLED(CONFIG_PREEMPT))
synchronize_sched(); synchronize_rcu_mult(call_rcu, call_rcu_sched);
#endif else
synchronize_rcu(); synchronize_rcu();
smpboot_park_threads(cpu); smpboot_park_threads(cpu);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册