lkml.org 
[lkml]   [2013]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/13] workqueue: add lock_pool_executing_work()
Hey,

On Tue, Feb 05, 2013 at 08:15:18PM +0800, Lai Jiangshan wrote:
> >So, if a work item is queued on the same CPU and it isn't being
> >executed, it will lock, look up the hash, unlock and then lock again?
> >If this is something improved by later patch, please explain so.
> >There gotta be a better way to do this, right?
> >
>
> The caller can't call this function if the work is on queue.
> the caller should call it only when CWQ bit is not set.

Yeah, but when it's off-queue but was queued on the same CPU the last
time, we would first lock, look up the hash, find out it's not
executing, unlock and then lock the same pool again, no?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-02-05 21:02    [W:0.063 / U:1.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site