Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-05 Thread Peter Sewell
On 5 March 2014 17:15, Torvald Riegel wrote: > On Tue, 2014-03-04 at 22:11 +0000, Peter Sewell wrote: >> On 3 March 2014 20:44, Torvald Riegel wrote: >> > On Sun, 2014-03-02 at 04:05 -0600, Peter Sewell wrote: >> >> On 1 March 2014 08:03, Paul E. McKenney >&

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-05 Thread Peter Sewell
On 5 March 2014 17:15, Torvald Riegel trie...@redhat.com wrote: On Tue, 2014-03-04 at 22:11 +, Peter Sewell wrote: On 3 March 2014 20:44, Torvald Riegel trie...@redhat.com wrote: On Sun, 2014-03-02 at 04:05 -0600, Peter Sewell wrote: On 1 March 2014 08:03, Paul E. McKenney paul

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-04 Thread Peter Sewell
On 3 March 2014 20:44, Torvald Riegel wrote: > On Sun, 2014-03-02 at 04:05 -0600, Peter Sewell wrote: >> On 1 March 2014 08:03, Paul E. McKenney wrote: >> > On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: >> >> Hi Paul, >> >> >>

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-04 Thread Peter Sewell
On 3 March 2014 20:44, Torvald Riegel trie...@redhat.com wrote: On Sun, 2014-03-02 at 04:05 -0600, Peter Sewell wrote: On 1 March 2014 08:03, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: Hi Paul, On 28 February 2014 18

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-02 Thread Peter Sewell
On 2 March 2014 23:20, Paul E. McKenney wrote: > On Sun, Mar 02, 2014 at 04:05:52AM -0600, Peter Sewell wrote: >> On 1 March 2014 08:03, Paul E. McKenney wrote: >> > On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: >> >> Hi Paul, >> >&g

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-02 Thread Peter Sewell
On 1 March 2014 08:03, Paul E. McKenney wrote: > On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: >> Hi Paul, >> >> On 28 February 2014 18:50, Paul E. McKenney >> wrote: >> > On Thu, Feb 27, 2014 at 12:53:12PM -0800, Paul E. McKenney wrote: >

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-02 Thread Peter Sewell
On 1 March 2014 08:03, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: Hi Paul, On 28 February 2014 18:50, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Thu, Feb 27, 2014 at 12:53:12PM -0800, Paul E. McKenney wrote

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-02 Thread Peter Sewell
On 2 March 2014 23:20, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Sun, Mar 02, 2014 at 04:05:52AM -0600, Peter Sewell wrote: On 1 March 2014 08:03, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: Hi Paul, On 28

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-01 Thread Peter Sewell
Hi Paul, On 28 February 2014 18:50, Paul E. McKenney wrote: > On Thu, Feb 27, 2014 at 12:53:12PM -0800, Paul E. McKenney wrote: >> On Thu, Feb 27, 2014 at 11:47:08AM -0800, Linus Torvalds wrote: >> > On Thu, Feb 27, 2014 at 11:06 AM, Paul E. McKenney >> > wrote: >> > > >> > > 3. The

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-01 Thread Peter Sewell
Hi Paul, On 28 February 2014 18:50, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Thu, Feb 27, 2014 at 12:53:12PM -0800, Paul E. McKenney wrote: On Thu, Feb 27, 2014 at 11:47:08AM -0800, Linus Torvalds wrote: On Thu, Feb 27, 2014 at 11:06 AM, Paul E. McKenney

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-21 Thread Peter Sewell
On 21 February 2014 19:41, Linus Torvalds wrote: > On Fri, Feb 21, 2014 at 11:16 AM, Linus Torvalds > wrote: >> >> Why would this be any different, especially since it's easy to >> understand both for a human and a compiler? > > Btw, the actual data path may actually be semantically meaningful

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-21 Thread Peter Sewell
On 21 February 2014 19:41, Linus Torvalds torva...@linux-foundation.org wrote: On Fri, Feb 21, 2014 at 11:16 AM, Linus Torvalds torva...@linux-foundation.org wrote: Why would this be any different, especially since it's easy to understand both for a human and a compiler? Btw, the actual

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 20:43, Torvald Riegel wrote: > On Tue, 2014-02-18 at 12:12 +0000, Peter Sewell wrote: >> Several of you have said that the standard and compiler should not >> permit speculative writes of atomics, or (effectively) that the >> compiler should preserve dep

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 17:16, Paul E. McKenney wrote: > On Tue, Feb 18, 2014 at 08:49:13AM -0800, Linus Torvalds wrote: >> On Tue, Feb 18, 2014 at 7:31 AM, Torvald Riegel wrote: >> > On Mon, 2014-02-17 at 16:05 -0800, Linus Torvalds wrote: >> >> And exactly because I know enough, I would *really*

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 17:38, Linus Torvalds wrote: > On Tue, Feb 18, 2014 at 4:12 AM, Peter Sewell > wrote: >> >> For example, suppose we have, in one compilation unit: >> >> void f(int ra, int*rb) { >> if (ra==42) >> *rb=42; >&g

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 12:53, Peter Zijlstra wrote: > On Tue, Feb 18, 2014 at 12:12:06PM +0000, Peter Sewell wrote: >> Several of you have said that the standard and compiler should not >> permit speculative writes of atomics, or (effectively) that the >> compiler should

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
Hi Paul, On 18 February 2014 14:56, Paul E. McKenney wrote: > On Tue, Feb 18, 2014 at 12:12:06PM +0000, Peter Sewell wrote: >> Several of you have said that the standard and compiler should not >> permit speculative writes of atomics, or (effectively) that the >> com

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
Several of you have said that the standard and compiler should not permit speculative writes of atomics, or (effectively) that the compiler should preserve dependencies. In simple examples it's easy to see what that means, but in general it's not so clear what the language should guarantee,

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
Several of you have said that the standard and compiler should not permit speculative writes of atomics, or (effectively) that the compiler should preserve dependencies. In simple examples it's easy to see what that means, but in general it's not so clear what the language should guarantee,

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
Hi Paul, On 18 February 2014 14:56, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Tue, Feb 18, 2014 at 12:12:06PM +, Peter Sewell wrote: Several of you have said that the standard and compiler should not permit speculative writes of atomics, or (effectively) that the compiler

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 12:53, Peter Zijlstra pet...@infradead.org wrote: On Tue, Feb 18, 2014 at 12:12:06PM +, Peter Sewell wrote: Several of you have said that the standard and compiler should not permit speculative writes of atomics, or (effectively) that the compiler should preserve

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 17:38, Linus Torvalds torva...@linux-foundation.org wrote: On Tue, Feb 18, 2014 at 4:12 AM, Peter Sewell peter.sew...@cl.cam.ac.uk wrote: For example, suppose we have, in one compilation unit: void f(int ra, int*rb) { if (ra==42) *rb=42; else

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 17:16, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Tue, Feb 18, 2014 at 08:49:13AM -0800, Linus Torvalds wrote: On Tue, Feb 18, 2014 at 7:31 AM, Torvald Riegel trie...@redhat.com wrote: On Mon, 2014-02-17 at 16:05 -0800, Linus Torvalds wrote: And exactly because

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 20:43, Torvald Riegel trie...@redhat.com wrote: On Tue, 2014-02-18 at 12:12 +, Peter Sewell wrote: Several of you have said that the standard and compiler should not permit speculative writes of atomics, or (effectively) that the compiler should preserve dependencies