Re: [PATCH] workqueue: Make create_worker() safe against spurious wakeups

From: Lai Jiangshan
Date: Thu Aug 04 2022 - 06:19:28 EST


On Thu, Aug 4, 2022 at 4:57 PM Lai Jiangshan <jiangshanlai@xxxxxxxxx> wrote:
;
>
> There might be some wakeups from wake_up_worker() since it is in
> the idle list. These wakeups will be "spurious wakeups" in the view
> of the completion subsystem.
>


Oh, sorry, I was wrong. "complete(&worker->ready_to_start);" and
"worker_enter_idle(worker);" are in the same pool lock region.

There are no "spurious wakeups" from "wake_up_worker()" as I have
wrongly described.