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]
Date:	Thu, 19 Jun 2014 09:36:24 -0400
From:	Tejun Heo <tj@...nel.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, cl@...ux-foundation.org,
	kmo@...erainc.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] percpu-refcount: implement percpu_ref_reinit() and
 percpu_ref_is_zero()

Hey, Paul.

On Wed, Jun 18, 2014 at 07:27:08PM -0700, Paul E. McKenney wrote:
> Yep, smp_load_acquire() orders its load against later loads and stores,
> so it really does need a memory barrier on weakly ordered systems.

Yeap.

> This is the "publish" operation for dynamically allocated per-CPU
> references?  If so, agreed, you should be able to rely on dependency
> ordering.  Make sure to comment the smp_read_barrier_depends().  ;-)

Definitely, there aren't many things which are more frustrating than
barriers w/o comments explaining their pairing.  I'm pairing
store_release with read_barrier_depends as that's what RCU is doing.
Is this the preferred way now?  I like the new store_release and
load_acquire as they document what's being barriered better but as Lai
suggested in another reply it does seem a bit unbalanced.  I wonder
whether load_acquire_depends would make sense.

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