Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Alan Stern
On Thu, 5 Apr 2018, Peter Zijlstra wrote: > On Thu, Apr 05, 2018 at 10:35:22AM -0400, Alan Stern wrote: > > In this example, READ_ONCE() is in fact a volatile access, so we're > > okay. > > But our documentation clearly states a control-dep can only be from a > READ_ONCE() (or something

Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Alan Stern
On Thu, 5 Apr 2018, Peter Zijlstra wrote: > On Thu, Apr 05, 2018 at 10:35:22AM -0400, Alan Stern wrote: > > In this example, READ_ONCE() is in fact a volatile access, so we're > > okay. > > But our documentation clearly states a control-dep can only be from a > READ_ONCE() (or something

Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Peter Zijlstra
On Thu, Apr 05, 2018 at 10:35:22AM -0400, Alan Stern wrote: > In this example, READ_ONCE() is in fact a volatile access, so we're > okay. But our documentation clearly states a control-dep can only be from a READ_ONCE() (or something stronger), right? So we should be good irrespectively.

Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Peter Zijlstra
On Thu, Apr 05, 2018 at 10:35:22AM -0400, Alan Stern wrote: > In this example, READ_ONCE() is in fact a volatile access, so we're > okay. But our documentation clearly states a control-dep can only be from a READ_ONCE() (or something stronger), right? So we should be good irrespectively.

Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Alan Stern
On Thu, 5 Apr 2018, Peter Zijlstra wrote: > On Wed, Apr 04, 2018 at 04:35:32PM -0400, Alan Stern wrote: > > On Wed, 4 Apr 2018, Daniel Jordan wrote: > > > > > A question for memory-barriers.txt aficionados. > > > > > > Is there a control dependency between the prior load of 'a' and the > > >

Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Alan Stern
On Thu, 5 Apr 2018, Peter Zijlstra wrote: > On Wed, Apr 04, 2018 at 04:35:32PM -0400, Alan Stern wrote: > > On Wed, 4 Apr 2018, Daniel Jordan wrote: > > > > > A question for memory-barriers.txt aficionados. > > > > > > Is there a control dependency between the prior load of 'a' and the > > >

Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Peter Zijlstra
On Wed, Apr 04, 2018 at 04:35:32PM -0400, Alan Stern wrote: > On Wed, 4 Apr 2018, Daniel Jordan wrote: > > > A question for memory-barriers.txt aficionados. > > > > Is there a control dependency between the prior load of 'a' and the > > later store of 'c'?: > > > >while (READ_ONCE(a)); > >

Re: Control dependency between prior load in while condition and later store?

2018-04-05 Thread Peter Zijlstra
On Wed, Apr 04, 2018 at 04:35:32PM -0400, Alan Stern wrote: > On Wed, 4 Apr 2018, Daniel Jordan wrote: > > > A question for memory-barriers.txt aficionados. > > > > Is there a control dependency between the prior load of 'a' and the > > later store of 'c'?: > > > >while (READ_ONCE(a)); > >

Re: Control dependency between prior load in while condition and later store?

2018-04-04 Thread Daniel Jordan
On 04/04/2018 04:35 PM, Alan Stern wrote: On Wed, 4 Apr 2018, Daniel Jordan wrote: A question for memory-barriers.txt aficionados. Is there a control dependency between the prior load of 'a' and the later store of 'c'?: while (READ_ONCE(a)); WRITE_ONCE(c, 1); I would say that yes,

Re: Control dependency between prior load in while condition and later store?

2018-04-04 Thread Daniel Jordan
On 04/04/2018 04:35 PM, Alan Stern wrote: On Wed, 4 Apr 2018, Daniel Jordan wrote: A question for memory-barriers.txt aficionados. Is there a control dependency between the prior load of 'a' and the later store of 'c'?: while (READ_ONCE(a)); WRITE_ONCE(c, 1); I would say that yes,

Re: Control dependency between prior load in while condition and later store?

2018-04-04 Thread Alan Stern
On Wed, 4 Apr 2018, Daniel Jordan wrote: > A question for memory-barriers.txt aficionados. > > Is there a control dependency between the prior load of 'a' and the > later store of 'c'?: > >while (READ_ONCE(a)); >WRITE_ONCE(c, 1); I would say that yes, there is. > I have my doubts

Re: Control dependency between prior load in while condition and later store?

2018-04-04 Thread Alan Stern
On Wed, 4 Apr 2018, Daniel Jordan wrote: > A question for memory-barriers.txt aficionados. > > Is there a control dependency between the prior load of 'a' and the > later store of 'c'?: > >while (READ_ONCE(a)); >WRITE_ONCE(c, 1); I would say that yes, there is. > I have my doubts

Control dependency between prior load in while condition and later store?

2018-04-04 Thread Daniel Jordan
A question for memory-barriers.txt aficionados. Is there a control dependency between the prior load of 'a' and the later store of 'c'?: while (READ_ONCE(a)); WRITE_ONCE(c, 1); I have my doubts because memory-barriers.txt doesn't talk much about loops and because of what that document

Control dependency between prior load in while condition and later store?

2018-04-04 Thread Daniel Jordan
A question for memory-barriers.txt aficionados. Is there a control dependency between the prior load of 'a' and the later store of 'c'?: while (READ_ONCE(a)); WRITE_ONCE(c, 1); I have my doubts because memory-barriers.txt doesn't talk much about loops and because of what that document