diff options
author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-07-17 18:40:09 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-07-17 18:40:08 -0700 |
commit | b1b3c5a65e5bbb95d1b512c8dc8d1dd3f2451a55 (patch) | |
tree | ed94966c969bd138895c6f788f4ff2910ecb3076 | |
parent | 70ca4f11d060dfa8077941311565257374980db8 (diff) | |
parent | 131e4378a0d7ae16ca61c0364ff35d987e782254 (diff) |
Merge "Revert "sched: Remove synchronize rcu/sched calls from _cpu_down""
-rw-r--r-- | kernel/cpu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 1a26ef5b7d58..87b88e8c0233 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -375,6 +375,21 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) 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 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(); + smpboot_park_threads(cpu); /* |