lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130205190903.GG4276@mtj.dyndns.org>
Date:	Tue, 5 Feb 2013 11:09:03 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Lai Jiangshan <eag0628@...il.com>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ