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

2014-03-07 Thread Paul E. McKenney
On Fri, Mar 07, 2014 at 07:33:25PM +0100, Torvald Riegel wrote: > On Wed, 2014-03-05 at 10:15 -0800, Paul E. McKenney wrote: > > On Wed, Mar 05, 2014 at 05:54:59PM +0100, Torvald Riegel wrote: > > > On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: > > > > On Tue, Mar 04, 2014 at

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

2014-03-07 Thread Paul E. McKenney
On Fri, Mar 07, 2014 at 06:45:57PM +0100, Torvald Riegel wrote: > xagsmtp5.20140307174618.3...@vmsdvm6.vnet.ibm.com > X-Xagent-Gateway: vmsdvm6.vnet.ibm.com (XAGSMTP5 at VMSDVM6) > > On Wed, 2014-03-05 at 10:01 -0800, Paul E. McKenney wrote: > > On Wed, Mar 05, 2014 at 05:26:36PM +0100, Torvald

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

2014-03-07 Thread Torvald Riegel
On Wed, 2014-03-05 at 10:15 -0800, Paul E. McKenney wrote: > On Wed, Mar 05, 2014 at 05:54:59PM +0100, Torvald Riegel wrote: > > On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: > > > On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: > > > > On Mon, Mar 03, 2014 at

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

2014-03-07 Thread Torvald Riegel
On Wed, 2014-03-05 at 10:01 -0800, Paul E. McKenney wrote: > On Wed, Mar 05, 2014 at 05:26:36PM +0100, Torvald Riegel wrote: > > xagsmtp3.20140305162928.8...@uk1vsc.vnet.ibm.com > > X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP3 at UK1VSC) > > > > On Tue, 2014-03-04 at 11:00 -0800, Paul E.

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

2014-03-07 Thread Torvald Riegel
On Wed, 2014-03-05 at 10:01 -0800, Paul E. McKenney wrote: On Wed, Mar 05, 2014 at 05:26:36PM +0100, Torvald Riegel wrote: xagsmtp3.20140305162928.8...@uk1vsc.vnet.ibm.com X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP3 at UK1VSC) On Tue, 2014-03-04 at 11:00 -0800, Paul E. McKenney

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

2014-03-07 Thread Torvald Riegel
On Wed, 2014-03-05 at 10:15 -0800, Paul E. McKenney wrote: On Wed, Mar 05, 2014 at 05:54:59PM +0100, Torvald Riegel wrote: On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 09:46:19PM

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

2014-03-07 Thread Paul E. McKenney
On Fri, Mar 07, 2014 at 06:45:57PM +0100, Torvald Riegel wrote: xagsmtp5.20140307174618.3...@vmsdvm6.vnet.ibm.com X-Xagent-Gateway: vmsdvm6.vnet.ibm.com (XAGSMTP5 at VMSDVM6) On Wed, 2014-03-05 at 10:01 -0800, Paul E. McKenney wrote: On Wed, Mar 05, 2014 at 05:26:36PM +0100, Torvald Riegel

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

2014-03-07 Thread Paul E. McKenney
On Fri, Mar 07, 2014 at 07:33:25PM +0100, Torvald Riegel wrote: On Wed, 2014-03-05 at 10:15 -0800, Paul E. McKenney wrote: On Wed, Mar 05, 2014 at 05:54:59PM +0100, Torvald Riegel wrote: On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: On Tue, Mar 04, 2014 at 11:00:32AM -0800,

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 +, 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 >> >> wrote: >> >> > On Sat, Mar 01,

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

2014-03-05 Thread Paul E. McKenney
On Wed, Mar 05, 2014 at 05:54:59PM +0100, Torvald Riegel wrote: > On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: > > On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: > > > On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: > > > >

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

2014-03-05 Thread Paul E. McKenney
On Wed, Mar 05, 2014 at 05:26:36PM +0100, Torvald Riegel wrote: > xagsmtp3.20140305162928.8...@uk1vsc.vnet.ibm.com > X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP3 at UK1VSC) > > On Tue, 2014-03-04 at 11:00 -0800, Paul E. McKenney wrote: > > On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald

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

2014-03-05 Thread Torvald Riegel
On Tue, 2014-03-04 at 22:11 +, 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 wrote: > >> > On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: > >> >> Hi

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

2014-03-05 Thread Torvald Riegel
On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: > On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: > > On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: > > > xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com > > > X-Xagent-Gateway: vmsdvma.vnet.ibm.com

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

2014-03-05 Thread Torvald Riegel
On Tue, 2014-03-04 at 11:00 -0800, Paul E. McKenney wrote: > On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: > > xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com > > X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) > > > > On Mon, 2014-03-03 at 11:20 -0800, Paul E.

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

2014-03-05 Thread Torvald Riegel
On Tue, 2014-03-04 at 11:00 -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) On Mon, 2014-03-03 at 11:20 -0800, Paul E. McKenney

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

2014-03-05 Thread Torvald Riegel
On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2

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

2014-03-05 Thread Torvald Riegel
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...@linux.vnet.ibm.com wrote: On Sat, Mar 01, 2014 at 04:06:34AM -0600,

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

2014-03-05 Thread Paul E. McKenney
On Wed, Mar 05, 2014 at 05:26:36PM +0100, Torvald Riegel wrote: xagsmtp3.20140305162928.8...@uk1vsc.vnet.ibm.com X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP3 at UK1VSC) On Tue, 2014-03-04 at 11:00 -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel

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

2014-03-05 Thread Paul E. McKenney
On Wed, Mar 05, 2014 at 05:54:59PM +0100, Torvald Riegel wrote: On Tue, 2014-03-04 at 13:35 -0800, Paul E. McKenney wrote: On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote:

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

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, >> >> >> >> On 28 February 2014 18:50, Paul E. McKenney >>

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

2014-03-04 Thread Paul E. McKenney
On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: > On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: > > xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com > > X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) > > > > On Mon, 2014-03-03 at 11:20 -0800,

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

2014-03-04 Thread Paul E. McKenney
On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: > xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com > X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) > > On Mon, 2014-03-03 at 11:20 -0800, Paul E. McKenney wrote: > > On Mon, Mar 03, 2014 at 07:55:08PM +0100, Torvald

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

2014-03-04 Thread Paul E. McKenney
On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) On Mon, 2014-03-03 at 11:20 -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 07:55:08PM +0100, Torvald Riegel

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

2014-03-04 Thread Paul E. McKenney
On Tue, Mar 04, 2014 at 11:00:32AM -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 09:46:19PM +0100, Torvald Riegel wrote: xagsmtp2.20140303204700.3...@vmsdvma.vnet.ibm.com X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) On Mon, 2014-03-03 at 11:20 -0800, Paul E.

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

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

2014-03-03 Thread Torvald Riegel
On Mon, 2014-03-03 at 11:20 -0800, Paul E. McKenney wrote: > On Mon, Mar 03, 2014 at 07:55:08PM +0100, Torvald Riegel wrote: > > xagsmtp2.20140303190831.9...@uk1vsc.vnet.ibm.com > > X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP2 at UK1VSC) > > > > On Fri, 2014-02-28 at 16:50 -0800, Paul E.

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

2014-03-03 Thread Torvald Riegel
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, > >> > >> On 28 February 2014 18:50, Paul E. McKenney > >> wrote: > >> > On Thu, Feb 27, 2014 at 12:53:12PM

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

2014-03-03 Thread Paul E. McKenney
On Mon, Mar 03, 2014 at 07:55:08PM +0100, Torvald Riegel wrote: > xagsmtp2.20140303190831.9...@uk1vsc.vnet.ibm.com > X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP2 at UK1VSC) > > On Fri, 2014-02-28 at 16:50 -0800, Paul E. McKenney wrote: > > +o Do not use the results from the boolean "&&" and

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

2014-03-03 Thread Torvald Riegel
On Fri, 2014-02-28 at 16:50 -0800, Paul E. McKenney wrote: > +oDo not use the results from the boolean "&&" and "||" when > + dereferencing. For example, the following (rather improbable) > + code is buggy: > + > + int a[2]; > + int index; > + int

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

2014-03-03 Thread Torvald Riegel
On Thu, 2014-02-27 at 09:50 -0800, Paul E. McKenney wrote: > Your proposal looks quite promising at first glance. But rather than > try and comment on it immediately, I am going to take a number of uses of > RCU from the Linux kernel and apply your proposal to them, then respond > with the

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

2014-03-03 Thread Torvald Riegel
On Thu, 2014-02-27 at 11:47 -0800, Linus Torvalds wrote: > On Thu, Feb 27, 2014 at 11:06 AM, Paul E. McKenney > wrote: > > > > 3. The comparison was against another RCU-protected pointer, > > where that other pointer was properly fetched using one > > of the RCU primitives.

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

2014-03-03 Thread Torvald Riegel
On Thu, 2014-02-27 at 09:01 -0800, Linus Torvalds wrote: > On Thu, Feb 27, 2014 at 7:37 AM, Torvald Riegel wrote: > > Regarding the latter, we make a fresh start at each mo_consume load (ie, > > we assume we know nothing -- L could have returned any possible value); > > I believe this is easier

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

2014-03-03 Thread Torvald Riegel
On Thu, 2014-02-27 at 09:01 -0800, Linus Torvalds wrote: On Thu, Feb 27, 2014 at 7:37 AM, Torvald Riegel trie...@redhat.com wrote: Regarding the latter, we make a fresh start at each mo_consume load (ie, we assume we know nothing -- L could have returned any possible value); I believe this

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

2014-03-03 Thread Torvald Riegel
On Thu, 2014-02-27 at 09:50 -0800, Paul E. McKenney wrote: Your proposal looks quite promising at first glance. But rather than try and comment on it immediately, I am going to take a number of uses of RCU from the Linux kernel and apply your proposal to them, then respond with the results

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

2014-03-03 Thread Torvald Riegel
On Thu, 2014-02-27 at 11:47 -0800, Linus Torvalds wrote: On Thu, Feb 27, 2014 at 11:06 AM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: 3. The comparison was against another RCU-protected pointer, where that other pointer was properly fetched using one of the

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

2014-03-03 Thread Torvald Riegel
On Fri, 2014-02-28 at 16:50 -0800, Paul E. McKenney wrote: +oDo not use the results from the boolean and || when + dereferencing. For example, the following (rather improbable) + code is buggy: + + int a[2]; + int index; + int

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

2014-03-03 Thread Paul E. McKenney
On Mon, Mar 03, 2014 at 07:55:08PM +0100, Torvald Riegel wrote: xagsmtp2.20140303190831.9...@uk1vsc.vnet.ibm.com X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP2 at UK1VSC) On Fri, 2014-02-28 at 16:50 -0800, Paul E. McKenney wrote: +o Do not use the results from the boolean and || when +

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

2014-03-03 Thread Torvald Riegel
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:50, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On

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

2014-03-03 Thread Torvald Riegel
On Mon, 2014-03-03 at 11:20 -0800, Paul E. McKenney wrote: On Mon, Mar 03, 2014 at 07:55:08PM +0100, Torvald Riegel wrote: xagsmtp2.20140303190831.9...@uk1vsc.vnet.ibm.com X-Xagent-Gateway: uk1vsc.vnet.ibm.com (XAGSMTP2 at UK1VSC) On Fri, 2014-02-28 at 16:50 -0800, Paul E. McKenney

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

2014-03-02 Thread Paul E. McKenney
On Sun, Mar 02, 2014 at 11:44:52PM +, Peter Sewell wrote: > 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

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, >> >> >> >> On 28 February 2014 18:50, Paul E.

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

2014-03-02 Thread Paul E. McKenney
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, > >> > >> On 28 February 2014 18:50, Paul E. McKenney > >> wrote: > >> > On Thu, Feb 27, 2014 at

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: >> >> On Thu, Feb 27, 2014 at 11:47:08AM

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 Paul E. McKenney
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 February 2014 18:50, Paul E. McKenney paul...@linux.vnet.ibm.com 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-02 Thread Paul E. McKenney
On Sun, Mar 02, 2014 at 11:44:52PM +, Peter Sewell wrote: 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,

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

2014-03-01 Thread Paul E. McKenney
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: > >> On Thu, Feb 27, 2014 at 11:47:08AM -0800, Linus Torvalds wrote: > >> > On Thu, Feb 27,

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-03-01 Thread Paul E. McKenney
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: On Thu, Feb 27, 2014 at 11:47:08AM -0800, Linus Torvalds wrote: On

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

2014-02-28 Thread Paul E. McKenney
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 comparison was against another RCU-protected pointer, > > > where

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

2014-02-28 Thread Paul E. McKenney
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 paul...@linux.vnet.ibm.com wrote: 3. The comparison was against another RCU-protected pointer,

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 09:50:21AM -0800, Paul E. McKenney wrote: > On Thu, Feb 27, 2014 at 04:37:33PM +0100, Torvald Riegel wrote: > > xagsmtp2.20140227154925.3...@vmsdvm9.vnet.ibm.com > > > > On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: > > > On Mon, Feb 24, 2014 at 10:53 AM, Paul

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

2014-02-27 Thread Paul E. McKenney
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 comparison was against another RCU-protected pointer, > > where that other pointer was properly fetched using one > > of the RCU

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

2014-02-27 Thread Linus Torvalds
On Thu, Feb 27, 2014 at 11:06 AM, Paul E. McKenney wrote: > > 3. The comparison was against another RCU-protected pointer, > where that other pointer was properly fetched using one > of the RCU primitives. Here it doesn't matter which pointer > you use. At least as

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 09:50:21AM -0800, Paul E. McKenney wrote: > On Thu, Feb 27, 2014 at 04:37:33PM +0100, Torvald Riegel wrote: > > xagsmtp2.20140227154925.3...@vmsdvm9.vnet.ibm.com > > > > On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: > > > On Mon, Feb 24, 2014 at 10:53 AM, Paul

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 09:01:40AM -0800, Linus Torvalds wrote: > On Thu, Feb 27, 2014 at 7:37 AM, Torvald Riegel wrote: > > > > I agree that just considering syntactic properties of the program seems > > to be insufficient. Making it instead depend on whether there is a > > "semantic"

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 04:37:33PM +0100, Torvald Riegel wrote: > xagsmtp2.20140227154925.3...@vmsdvm9.vnet.ibm.com > > On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: > > On Mon, Feb 24, 2014 at 10:53 AM, Paul E. McKenney > > wrote: > > > > > > Good points. How about the following

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

2014-02-27 Thread Linus Torvalds
On Thu, Feb 27, 2014 at 7:37 AM, Torvald Riegel wrote: > > I agree that just considering syntactic properties of the program seems > to be insufficient. Making it instead depend on whether there is a > "semantic" dependency due to a value being "necessary" to compute a > result seems better.

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

2014-02-27 Thread Torvald Riegel
On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: > On Mon, Feb 24, 2014 at 10:53 AM, Paul E. McKenney > wrote: > > > > Good points. How about the following replacements? > > > > 3. Adding or subtracting an integer to/from a chained pointer > > results in another chained

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

2014-02-27 Thread Torvald Riegel
On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: On Mon, Feb 24, 2014 at 10:53 AM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: Good points. How about the following replacements? 3. Adding or subtracting an integer to/from a chained pointer results in

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

2014-02-27 Thread Linus Torvalds
On Thu, Feb 27, 2014 at 7:37 AM, Torvald Riegel trie...@redhat.com wrote: I agree that just considering syntactic properties of the program seems to be insufficient. Making it instead depend on whether there is a semantic dependency due to a value being necessary to compute a result seems

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 04:37:33PM +0100, Torvald Riegel wrote: xagsmtp2.20140227154925.3...@vmsdvm9.vnet.ibm.com On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: On Mon, Feb 24, 2014 at 10:53 AM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: Good points. How about the

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 09:01:40AM -0800, Linus Torvalds wrote: On Thu, Feb 27, 2014 at 7:37 AM, Torvald Riegel trie...@redhat.com wrote: I agree that just considering syntactic properties of the program seems to be insufficient. Making it instead depend on whether there is a semantic

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 09:50:21AM -0800, Paul E. McKenney wrote: On Thu, Feb 27, 2014 at 04:37:33PM +0100, Torvald Riegel wrote: xagsmtp2.20140227154925.3...@vmsdvm9.vnet.ibm.com On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: On Mon, Feb 24, 2014 at 10:53 AM, Paul E. McKenney

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

2014-02-27 Thread Linus Torvalds
On Thu, Feb 27, 2014 at 11:06 AM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: 3. The comparison was against another RCU-protected pointer, where that other pointer was properly fetched using one of the RCU primitives. Here it doesn't matter which pointer

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

2014-02-27 Thread Paul E. McKenney
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 paul...@linux.vnet.ibm.com wrote: 3. The comparison was against another RCU-protected pointer, where that other pointer was properly fetched using one

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

2014-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2014 at 09:50:21AM -0800, Paul E. McKenney wrote: On Thu, Feb 27, 2014 at 04:37:33PM +0100, Torvald Riegel wrote: xagsmtp2.20140227154925.3...@vmsdvm9.vnet.ibm.com On Mon, 2014-02-24 at 11:54 -0800, Linus Torvalds wrote: On Mon, Feb 24, 2014 at 10:53 AM, Paul E. McKenney

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

2014-02-26 Thread Torvald Riegel
On Wed, 2014-02-26 at 18:43 +, Joseph S. Myers wrote: > On Wed, 26 Feb 2014, Torvald Riegel wrote: > > > On Fri, 2014-02-21 at 22:10 +, Joseph S. Myers wrote: > > > On Fri, 21 Feb 2014, Paul E. McKenney wrote: > > > > > > > This needs to be as follows: > > > > > > > >

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

2014-02-26 Thread Joseph S. Myers
On Wed, 26 Feb 2014, Torvald Riegel wrote: > On Fri, 2014-02-21 at 22:10 +, Joseph S. Myers wrote: > > On Fri, 21 Feb 2014, Paul E. McKenney wrote: > > > > > This needs to be as follows: > > > > > > [[carries_dependency]] int getzero(int i [[carries_dependency]]) > > > { > > > return i -

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

2014-02-26 Thread Paul E. McKenney
On Wed, Feb 26, 2014 at 02:04:30PM +0100, Torvald Riegel wrote: > xagsmtp2.20140226130517.3...@vmsdvma.vnet.ibm.com > X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) > > On Fri, 2014-02-21 at 11:13 -0800, Paul E. McKenney wrote: > > On Fri, Feb 21, 2014 at 07:35:37PM +0100, Michael

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

2014-02-26 Thread Torvald Riegel
On Mon, 2014-02-24 at 09:28 -0800, Paul E. McKenney wrote: > On Mon, Feb 24, 2014 at 05:55:50PM +0100, Michael Matz wrote: > > Hi, > > > > On Mon, 24 Feb 2014, Linus Torvalds wrote: > > > > > > To me that reads like > > > > > > > > int i; > > > > int *q = > > > > int **p = > > > > > > >

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

2014-02-26 Thread Torvald Riegel
On Mon, 2014-02-24 at 09:38 -0800, Linus Torvalds wrote: > On Mon, Feb 24, 2014 at 8:55 AM, Michael Matz wrote: > > > > So, let me try to poke holes into your definition or increase my > > understanding :) . You said "chain of pointers"(dereferences I assume), > > e.g. if p is result of consume

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

2014-02-26 Thread Torvald Riegel
On Fri, 2014-02-21 at 22:10 +, Joseph S. Myers wrote: > On Fri, 21 Feb 2014, Paul E. McKenney wrote: > > > This needs to be as follows: > > > > [[carries_dependency]] int getzero(int i [[carries_dependency]]) > > { > > return i - i; > > } > > > > Otherwise dependencies won't get carried

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

2014-02-26 Thread Torvald Riegel
On Fri, 2014-02-21 at 11:13 -0800, Paul E. McKenney wrote: > On Fri, Feb 21, 2014 at 07:35:37PM +0100, Michael Matz wrote: > > Hi, > > > > On Thu, 20 Feb 2014, Linus Torvalds wrote: > > > > > But I'm pretty sure that any compiler guy must *hate* that current odd > > > dependency-generation part,

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

2014-02-26 Thread Torvald Riegel
On Fri, 2014-02-21 at 11:13 -0800, Paul E. McKenney wrote: On Fri, Feb 21, 2014 at 07:35:37PM +0100, Michael Matz wrote: Hi, On Thu, 20 Feb 2014, Linus Torvalds wrote: But I'm pretty sure that any compiler guy must *hate* that current odd dependency-generation part, and if I was a

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

2014-02-26 Thread Torvald Riegel
On Fri, 2014-02-21 at 22:10 +, Joseph S. Myers wrote: On Fri, 21 Feb 2014, Paul E. McKenney wrote: This needs to be as follows: [[carries_dependency]] int getzero(int i [[carries_dependency]]) { return i - i; } Otherwise dependencies won't get carried through it.

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

2014-02-26 Thread Torvald Riegel
On Mon, 2014-02-24 at 09:38 -0800, Linus Torvalds wrote: On Mon, Feb 24, 2014 at 8:55 AM, Michael Matz m...@suse.de wrote: So, let me try to poke holes into your definition or increase my understanding :) . You said chain of pointers(dereferences I assume), e.g. if p is result of consume

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

2014-02-26 Thread Torvald Riegel
On Mon, 2014-02-24 at 09:28 -0800, Paul E. McKenney wrote: On Mon, Feb 24, 2014 at 05:55:50PM +0100, Michael Matz wrote: Hi, On Mon, 24 Feb 2014, Linus Torvalds wrote: To me that reads like int i; int *q = i; int **p = q; atomic_XXX (p, CONSUME);

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

2014-02-26 Thread Paul E. McKenney
On Wed, Feb 26, 2014 at 02:04:30PM +0100, Torvald Riegel wrote: xagsmtp2.20140226130517.3...@vmsdvma.vnet.ibm.com X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGSMTP2 at VMSDVMA) On Fri, 2014-02-21 at 11:13 -0800, Paul E. McKenney wrote: On Fri, Feb 21, 2014 at 07:35:37PM +0100, Michael Matz

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

2014-02-26 Thread Joseph S. Myers
On Wed, 26 Feb 2014, Torvald Riegel wrote: On Fri, 2014-02-21 at 22:10 +, Joseph S. Myers wrote: On Fri, 21 Feb 2014, Paul E. McKenney wrote: This needs to be as follows: [[carries_dependency]] int getzero(int i [[carries_dependency]]) { return i - i; }

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

2014-02-26 Thread Torvald Riegel
On Wed, 2014-02-26 at 18:43 +, Joseph S. Myers wrote: On Wed, 26 Feb 2014, Torvald Riegel wrote: On Fri, 2014-02-21 at 22:10 +, Joseph S. Myers wrote: On Fri, 21 Feb 2014, Paul E. McKenney wrote: This needs to be as follows: [[carries_dependency]] int getzero(int i

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

2014-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2014 at 08:32:38PM -0700, Jeff Law wrote: > On 02/25/14 17:15, Paul E. McKenney wrote: > >>I have for the last several years been 100% convinced that the Intel > >>memory ordering is the right thing, and that people who like weak > >>memory ordering are wrong and should try to

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

2014-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2014 at 10:06:53PM -0500, George Spelvin wrote: > wrote: > > wrote: > >> I have for the last several years been 100% convinced that the Intel > >> memory ordering is the right thing, and that people who like weak > >> memory ordering are wrong and should try to avoid reproducing

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

2014-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2014 at 05:47:03PM -0800, Linus Torvalds wrote: > On Mon, Feb 24, 2014 at 10:00 PM, Paul E. McKenney > wrote: > > > > So let me see if I understand your reasoning. My best guess is that it > > goes something like this: > > > > 1. The Linux kernel contains code that passes

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

2014-02-25 Thread Jeff Law
On 02/25/14 17:15, Paul E. McKenney wrote: I have for the last several years been 100% convinced that the Intel memory ordering is the right thing, and that people who like weak memory ordering are wrong and should try to avoid reproducing if at all possible. But given that we have memory

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

2014-02-25 Thread George Spelvin
wrote: > wrote: >> I have for the last several years been 100% convinced that the Intel >> memory ordering is the right thing, and that people who like weak >> memory ordering are wrong and should try to avoid reproducing if at >> all possible. > > Are ARM and Power really the bad boys here? Or

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

2014-02-25 Thread Linus Torvalds
On Mon, Feb 24, 2014 at 10:00 PM, Paul E. McKenney wrote: > > So let me see if I understand your reasoning. My best guess is that it > goes something like this: > > 1. The Linux kernel contains code that passes pointers from > rcu_dereference() through external functions. No,

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

2014-02-25 Thread Paul E. McKenney
On Mon, Feb 24, 2014 at 10:05:52PM -0800, Linus Torvalds wrote: > On Mon, Feb 24, 2014 at 3:35 PM, Linus Torvalds > wrote: > > > > Litmus test 1: > > > > p = atomic_read(pp, consume); > > if (p == ) > > return p->val; > > > >is *NOT* ordered > > Btw, don't get me wrong. I

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

2014-02-25 Thread Paul E. McKenney
On Mon, Feb 24, 2014 at 10:05:52PM -0800, Linus Torvalds wrote: On Mon, Feb 24, 2014 at 3:35 PM, Linus Torvalds torva...@linux-foundation.org wrote: Litmus test 1: p = atomic_read(pp, consume); if (p == variable) return p-val; is *NOT* ordered Btw, don't get

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

2014-02-25 Thread Linus Torvalds
On Mon, Feb 24, 2014 at 10:00 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: So let me see if I understand your reasoning. My best guess is that it goes something like this: 1. The Linux kernel contains code that passes pointers from rcu_dereference() through external

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

2014-02-25 Thread George Spelvin
paul...@linux.vnet.ibm.com wrote: torva...@linux-foundation.org wrote: I have for the last several years been 100% convinced that the Intel memory ordering is the right thing, and that people who like weak memory ordering are wrong and should try to avoid reproducing if at all possible. Are

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

2014-02-25 Thread Jeff Law
On 02/25/14 17:15, Paul E. McKenney wrote: I have for the last several years been 100% convinced that the Intel memory ordering is the right thing, and that people who like weak memory ordering are wrong and should try to avoid reproducing if at all possible. But given that we have memory

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

2014-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2014 at 05:47:03PM -0800, Linus Torvalds wrote: On Mon, Feb 24, 2014 at 10:00 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: So let me see if I understand your reasoning. My best guess is that it goes something like this: 1. The Linux kernel contains code

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

2014-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2014 at 10:06:53PM -0500, George Spelvin wrote: paul...@linux.vnet.ibm.com wrote: torva...@linux-foundation.org wrote: I have for the last several years been 100% convinced that the Intel memory ordering is the right thing, and that people who like weak memory ordering are

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

2014-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2014 at 08:32:38PM -0700, Jeff Law wrote: On 02/25/14 17:15, Paul E. McKenney wrote: I have for the last several years been 100% convinced that the Intel memory ordering is the right thing, and that people who like weak memory ordering are wrong and should try to avoid

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

2014-02-24 Thread Linus Torvalds
On Mon, Feb 24, 2014 at 3:35 PM, Linus Torvalds wrote: > > Litmus test 1: > > p = atomic_read(pp, consume); > if (p == ) > return p->val; > >is *NOT* ordered Btw, don't get me wrong. I don't _like_ it not being ordered, and I actually did spend some time thinking about my

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

2014-02-24 Thread Paul E. McKenney
On Mon, Feb 24, 2014 at 03:35:04PM -0800, Linus Torvalds wrote: > On Mon, Feb 24, 2014 at 2:37 PM, Paul E. McKenney > wrote: > >> > >> What if the "nothing modifies 'p'" part looks like this: > >> > >> if (p != ) > >> return; > >> > >> and now any sane compiler will happily optimize

  1   2   3   4   5   6   >