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: <20160426174513.GM7822@mtj.duckdns.org>
Date:	Tue, 26 Apr 2016 13:45:13 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	Roman Pen <roman.penyaev@...fitbricks.com>,
	Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 1/1] [RFC] workqueue: fix ghost PENDING flag while doing
 MQ IO

Hello, Peter.

On Tue, Apr 26, 2016 at 10:27:59AM -0700, Peter Hurley wrote:
> > It's unlikely to make any measureable difference.  Is xchg() actually
> > cheaper than store + rmb?
> 
> store + mfence (full barrier), yes. Roughly 2x faster.
> 
> https://lkml.org/lkml/2015/11/2/607

Ah, didn't know that.  Thanks for the pointer.

> > I'm not necessarily against making all clearings of
> > PENDING to be followed by a rmb or use xhcg.  Reasons 2-4 are pretty
> > weak tho.
> 
> I agree 2 and 3 are not the best reasons.
> Actually, it looks that I'm in the minority anyway, and that style-wise,
> naked barrier is preferred.

As long as what's happening is clearly documented, I think either is
fine.  I'm gonna go with Roman's mb patch for -stable fix but think
it'd be nice to have a separate patch to consolidate the paths which
clear PENDING and make them use xchg.  If you can spin up a patch for
that, I'd be happy to apply it to wq/for-3.7.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ