[llvmlinux] Fwd: Re: Proposal for new memory_order_consume definition

Behan Webster behanw at converseincode.com
Tue Jan 19 23:02:49 UTC 2016

This is probably interesting to some of the people here who haven't seen it.


-------- Forwarded Message --------
Subject: 	Re: Proposal for new memory_order_consume definition
Date: 	Tue, 19 Jan 2016 14:25:12 -0800
From: 	Paul E. McKenney <paulmck at linux.vnet.ibm.com>
Reply-To: 	paulmck at linux.vnet.ibm.com
To: 	c++std-parallel at accu.org
CC: 	linux-kernel at vger.kernel.org, triegel at redhat.com, 
jeff at preshing.com, boehm at acm.org, clark.nelson at intel.com, 
OGiroux at nvidia.com, Lawrence at Crowl.org, dhowells at redhat.com, 
joseph at codesourcery.com, torvalds at linux-foundation.org, 
Mark.Batty at cl.cam.ac.uk, Peter.Sewell at cl.cam.ac.uk, 
peterz at infradead.org, will.deacon at arm.com, behanw at converseincode.com, 
jfb at google.com, Jens.Maurer at gmx.net, michaelw at ca.ibm.com

On Mon, Jan 11, 2016 at 03:11:42PM -0800, Paul E. McKenney wrote:
> Hello!
> As requested at the October 2015 C++ Standards Committee Meeting, I have
> created a single proposal for memory_order_consume in C++:
> http://www2.rdrop.com/users/paulmck/submission/consume.2016.01.11b.pdf
> This contains an informal description of the proposal, rough-draft
> wording changes, and a number of litmus tests demonstrating how the
> proposal works.
> The required changes to compilers appears to be extremely small,
> however, I would like to get more compiler writers' thoughts on the
> pointer_cmp_eq_dep(), pointer_cmp_ne_dep(), pointer_cmp_gt_dep(),
> pointer_cmp_ge_dep(), pointer_cmp_lt_dep(), and pointer_cmp_le_dep()
> intrinsics that do pointer comparisons without breaking dependencies on
> their first argument.  Figures 25 and 26 on page 16 demonstrate their use.
> These intrinsics were suggested at the October meeting, but it would be
> good to get wider feedback on them.
> Note that last I checked, the Linux kernel actually does not depend
> on pointer comparisons not breaking dependency chains, because all
> comparisons are against NULL or a list-head structure, in which case
> the pointer is not going to be dereferenced after an equals comparison.
> But I do believe that some past versions of the Linux kernel have depended
> on this.

And an update based on considerable off-list feedback.

More thoughts?

  							Thanx, Paul

> PS.  For more background information, please see:
> 	http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0098r0.pdf

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20160119/cfd9ff45/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: consume.2016.01.19a.pdf
Type: application/pdf
Size: 288460 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20160119/cfd9ff45/attachment-0001.pdf>

More information about the LLVMLinux mailing list