lkml.org 
[lkml]   [2012]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/11 V5] workqueue: Add @bind arguement back without change any thing
On 09/06/2012 03:49 AM, Tejun Heo wrote:
> Hello,
>
> On Wed, Sep 05, 2012 at 06:37:42PM +0800, Lai Jiangshan wrote:
>> Ensure the gcwq->flags is only accessed with gcwq->lock held.
>> And make the code more easier to understand.
>>
>> In all current callsite of create_worker(), DISASSOCIATED can't
>> be flipped while create_worker().
>> So the whole behavior is unchanged with this patch.
>
> This doesn't change anything. You're just moving the test to the
> caller with comments there explaining how it won't change even if
> gcwq->lock is released. It seems more confusing to me. The flag is
> still protected by manager_mutex. How is this an improvement?
>

Some other bit of gcwq->flags is accessed(modified) without manager_mutex.
making gcwq->flags be accessed only form gcwq->lock C.S. will help the reviewer.

I don't like adding special things/code when not-absolutely-required.



\
 
 \ /
  Last update: 2012-09-06 03:41    [W:0.107 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site