Re: liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Paul E. McKenney
On Fri, Apr 16, 2021 at 03:30:53PM -0400, Mathieu Desnoyers wrote: > - On Apr 16, 2021, at 3:02 PM, paulmck paul...@kernel.org wrote: > [...] > > > > If it can be done reasonably, I suggest also having some way for the > > person building userspace RCU to say "I know what I am doing, so do >

Re: liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Mathieu Desnoyers
- On Apr 16, 2021, at 3:02 PM, paulmck paul...@kernel.org wrote: [...] > > If it can be done reasonably, I suggest also having some way for the > person building userspace RCU to say "I know what I am doing, so do > it with volatile rather than memory_order_consume." Like so ? #define

Re: liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Paul E. McKenney
On Fri, Apr 16, 2021 at 02:40:08PM -0400, Mathieu Desnoyers wrote: > - On Apr 16, 2021, at 12:01 PM, paulmck paul...@kernel.org wrote: > > > On Fri, Apr 16, 2021 at 05:17:11PM +0200, Peter Zijlstra wrote: > >> On Fri, Apr 16, 2021 at 10:52:16AM -0400, Mathieu Desnoyers wrote: > >> > Hi Paul,

Re: liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Mathieu Desnoyers
- On Apr 16, 2021, at 12:01 PM, paulmck paul...@kernel.org wrote: > On Fri, Apr 16, 2021 at 05:17:11PM +0200, Peter Zijlstra wrote: >> On Fri, Apr 16, 2021 at 10:52:16AM -0400, Mathieu Desnoyers wrote: >> > Hi Paul, Will, Peter, >> > >> > I noticed in this discussion

Re: liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Paul E. McKenney
On Fri, Apr 16, 2021 at 05:17:11PM +0200, Peter Zijlstra wrote: > On Fri, Apr 16, 2021 at 10:52:16AM -0400, Mathieu Desnoyers wrote: > > Hi Paul, Will, Peter, > > > > I noticed in this discussion https://lkml.org/lkml/2021/4/16/118 that LTO > > is able to break rcu_dereference. This seems to be

Re: liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Peter Zijlstra
On Fri, Apr 16, 2021 at 10:52:16AM -0400, Mathieu Desnoyers wrote: > Hi Paul, Will, Peter, > > I noticed in this discussion https://lkml.org/lkml/2021/4/16/118 that LTO > is able to break rcu_dereference. This seems to be taken care of by > arch/arm64/include/asm/rwonce.h on arm64 in the Linux

liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Mathieu Desnoyers
Hi Paul, Will, Peter, I noticed in this discussion https://lkml.org/lkml/2021/4/16/118 that LTO is able to break rcu_dereference. This seems to be taken care of by arch/arm64/include/asm/rwonce.h on arm64 in the Linux kernel tree. In the liburcu user-space library, we have this comment near