Re: [PATCH 3/3] workqueue: kick worker to die directly in idle timeout handler
From: Tejun Heo
Date: Tue Feb 18 2014 - 17:33:33 EST
On Tue, Feb 18, 2014 at 12:24:03AM +0800, Lai Jiangshan wrote:
> since original destroy_worker() does not do the full-destruction,
> its main work just deprives the worker-duty from worker-thread and kick
> it to die, so we rename it to kick_worker_to_die().
>
> And since kick_worker_to_die() don't need manager_mutex and sleeping,
> so we move maybe_destroy_worker() out from manager and kick worker to die
> directly in idle timeout handler. And we remove %POOL_MANAGE_WORKERS which
> help us remove a branch in worker_thread().
>
> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
Heh, this is awesome. :)
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/