Re: [PATCH 6/7] workqueue: init 0 for idle_rebind.cnt

From: Lai Jiangshan
Date: Tue Aug 28 2012 - 00:36:27 EST


On Tue, Aug 28, 2012 at 4:05 AM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> On Tue, Aug 28, 2012 at 01:58:26AM +0800, Lai Jiangshan wrote:
>> Access idle_rebind.cnt is always protected by gcwq->lock,
>> don't need to init it as 1.
>
> But then the completion could be triggered prematurely, no?

No, the idle_worker_rebind() can't be called until rebind_workers()
finish counting and release the gcwq->lock.

>
> 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/
--
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/