Re: Does Itanium permit speculative stores?

2013-11-27 Thread Paul E. McKenney
On Tue, Nov 26, 2013 at 11:55:58PM -0500, Jon Masters wrote: > On 11/11/2013 12:13 PM, Paul E. McKenney wrote: > > Hello, Tony, > > > > Does Itanium permit speculative stores? For example, on Itanium what are > > the permitted outcomes of the following litm

Re: Does Itanium permit speculative stores?

2013-11-27 Thread Paul E. McKenney
On Tue, Nov 26, 2013 at 11:55:58PM -0500, Jon Masters wrote: On 11/11/2013 12:13 PM, Paul E. McKenney wrote: Hello, Tony, Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero

Re: Does Itanium permit speculative stores?

2013-11-26 Thread Jon Masters
On 11/11/2013 12:13 PM, Paul E. McKenney wrote: > Hello, Tony, > > Does Itanium permit speculative stores? For example, on Itanium what are > the permitted outcomes of the following litmus test, where both x and y > are initially zero? > > CPU 0

Re: Does Itanium permit speculative stores?

2013-11-26 Thread Jon Masters
On 11/11/2013 12:13 PM, Paul E. McKenney wrote: Hello, Tony, Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero? CPU 0 CPU 1 r1

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Paul E. McKenney
On Tue, Nov 12, 2013 at 07:26:17PM +0100, Peter Zijlstra wrote: > On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: > > > Does Itanium permit speculative stores? For example, on Itanium what are > > > the permitted outcomes of the following litmus tes

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Paul E. McKenney
On Tue, Nov 12, 2013 at 06:46:20PM +, Luck, Tony wrote: > > So the point we're having a discussion on is if any architecture has > > visible speculative STORES and if there's an architecture that doesn't > > have control dependencies. > > > > On the visible speculative STORES; can, if in the

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 06:46:20PM +, Luck, Tony wrote: > > So the point we're having a discussion on is if any architecture has > > visible speculative STORES and if there's an architecture that doesn't > > have control dependencies. > > > > On the visible speculative STORES; can, if in the

RE: Does Itanium permit speculative stores?

2013-11-12 Thread Luck, Tony
> So the point we're having a discussion on is if any architecture has > visible speculative STORES and if there's an architecture that doesn't > have control dependencies. > > On the visible speculative STORES; can, if in the above example we have > regular loads/stores: > > LOAD r1, x

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: > The "ACCESS_ONCE" macro casts to volatile - which will make gcc generate > ordered "ld.acq" and "st.rel" instructions for your code snippets. So I think > you should be fine. Hurm.. so: +#define smp_store_release(p, v)

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Paul E. McKenney
On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: > > Does Itanium permit speculative stores? For example, on Itanium what are > > the permitted outcomes of the following litmus test, where both x and y > > are initially zero? > > We have a complier visi

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: > > Does Itanium permit speculative stores? For example, on Itanium what are > > the permitted outcomes of the following litmus test, where both x and y > > are initially zero? > > We have a complier visi

RE: Does Itanium permit speculative stores?

2013-11-12 Thread Luck, Tony
> Does Itanium permit speculative stores? For example, on Itanium what are > the permitted outcomes of the following litmus test, where both x and y > are initially zero? We have a complier visible speculative read via the "ld.s" and "chk" instructions. But there i

RE: Does Itanium permit speculative stores?

2013-11-12 Thread Luck, Tony
Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero? We have a complier visible speculative read via the ld.s and chk instructions. But there is no speculative write (st.s

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero? We have a complier visible speculative read via the ld.s

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Paul E. McKenney
On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero? We have a complier visible speculative read via the ld.s

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: The ACCESS_ONCE macro casts to volatile - which will make gcc generate ordered ld.acq and st.rel instructions for your code snippets. So I think you should be fine. Hurm.. so: +#define smp_store_release(p, v)

RE: Does Itanium permit speculative stores?

2013-11-12 Thread Luck, Tony
So the point we're having a discussion on is if any architecture has visible speculative STORES and if there's an architecture that doesn't have control dependencies. On the visible speculative STORES; can, if in the above example we have regular loads/stores: LOAD r1, x

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 06:46:20PM +, Luck, Tony wrote: So the point we're having a discussion on is if any architecture has visible speculative STORES and if there's an architecture that doesn't have control dependencies. On the visible speculative STORES; can, if in the above

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Paul E. McKenney
On Tue, Nov 12, 2013 at 06:46:20PM +, Luck, Tony wrote: So the point we're having a discussion on is if any architecture has visible speculative STORES and if there's an architecture that doesn't have control dependencies. On the visible speculative STORES; can, if in the above

Re: Does Itanium permit speculative stores?

2013-11-12 Thread Paul E. McKenney
On Tue, Nov 12, 2013 at 07:26:17PM +0100, Peter Zijlstra wrote: On Tue, Nov 12, 2013 at 06:00:26PM +, Luck, Tony wrote: Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero

Does Itanium permit speculative stores?

2013-11-11 Thread Paul E. McKenney
Hello, Tony, Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero? CPU 0 CPU 1 r1 = ACCESS_ONCE(x);r2 = ACCESS_ONCE(y

Does Itanium permit speculative stores?

2013-11-11 Thread Paul E. McKenney
Hello, Tony, Does Itanium permit speculative stores? For example, on Itanium what are the permitted outcomes of the following litmus test, where both x and y are initially zero? CPU 0 CPU 1 r1 = ACCESS_ONCE(x);r2 = ACCESS_ONCE(y