X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Fcpu.c;h=deff2e693766997a259b4b3ac2fc4f789e554f1d;hb=5580723faa4f8e68423e148db8bc8ca19013530f;hp=973d034acf844b25c1f1d35cd66dd7ff17e2c31d;hpb=f0d55cc1a65852e6647d4f5d707c1c9b5471ce3c;p=~andy%2Flinux diff --git a/kernel/cpu.c b/kernel/cpu.c index 973d034acf8..deff2e69376 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -306,7 +306,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) __func__, cpu); goto out_release; } - smpboot_park_threads(cpu); /* * By now we've cleared cpu_active_mask, wait for all preempt-disabled @@ -315,12 +314,16 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) * * 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(). */