Re: Workqueues splat due to ending up on wrong CPU
From: Peter Zijlstra
Date: Tue Dec 03 2019 - 05:07:06 EST
On Tue, Dec 03, 2019 at 10:55:21AM +0100, Peter Zijlstra wrote:
> @@ -1100,6 +1099,12 @@ void cpuhp_online_idle(enum cpuhp_state state)
> if (state != CPUHP_AP_ONLINE_IDLE)
> return;
>
> + /*
> + * Unpark the stopper thread before we start the idle thread; this
s/thread/loop/, _this_ is the idle thread :-)
> + * ensures the stopper is always available.
> + */
> + stop_machine_unpark(smp_processor_id());
> +
> st->state = CPUHP_AP_ONLINE_IDLE;
> complete_ap_thread(st, true);
> }