Re: [RFC PATCH 1/2] riscv/spinlock: Strengthen implementations with fences

2018-03-09 Thread Palmer Dabbelt
On Fri, 09 Mar 2018 04:16:43 PST (-0800), parri.and...@gmail.com wrote: On Thu, Mar 08, 2018 at 02:11:12PM -0800, Palmer Dabbelt wrote: On Thu, 08 Mar 2018 13:03:03 PST (-0800), parri.and...@gmail.com wrote: >On Wed, Mar 07, 2018 at 10:33:49AM -0800, Palmer Dabbelt wrote: > >[...] > >>I'm going

Re: [RFC PATCH 1/2] riscv/spinlock: Strengthen implementations with fences

2018-03-09 Thread Andrea Parri
On Thu, Mar 08, 2018 at 02:11:12PM -0800, Palmer Dabbelt wrote: > On Thu, 08 Mar 2018 13:03:03 PST (-0800), parri.and...@gmail.com wrote: > >On Wed, Mar 07, 2018 at 10:33:49AM -0800, Palmer Dabbelt wrote: > > > >[...] > > > >>I'm going to go produce a new set of spinlocks, I think it'll be a bit mo

Re: [RFC PATCH 1/2] riscv/spinlock: Strengthen implementations with fences

2018-03-08 Thread Palmer Dabbelt
On Thu, 08 Mar 2018 13:03:03 PST (-0800), parri.and...@gmail.com wrote: On Wed, Mar 07, 2018 at 10:33:49AM -0800, Palmer Dabbelt wrote: [...] I'm going to go produce a new set of spinlocks, I think it'll be a bit more coherent then. I'm keeping your other patch in my queue for now, it general

Re: [RFC PATCH 1/2] riscv/spinlock: Strengthen implementations with fences

2018-03-08 Thread Andrea Parri
On Wed, Mar 07, 2018 at 10:33:49AM -0800, Palmer Dabbelt wrote: [...] > I'm going to go produce a new set of spinlocks, I think it'll be a bit more > coherent then. > > I'm keeping your other patch in my queue for now, it generally looks good > but I haven't looked closely yet. Patches 1 and 2

Re: [RFC PATCH 1/2] riscv/spinlock: Strengthen implementations with fences

2018-03-07 Thread Palmer Dabbelt
On Wed, 07 Mar 2018 02:52:42 PST (-0800), parri.and...@gmail.com wrote: On Tue, Mar 06, 2018 at 06:02:28PM -0800, Palmer Dabbelt wrote: On Mon, 05 Mar 2018 10:24:09 PST (-0800), parri.and...@gmail.com wrote: >Current implementations map locking operations using .rl and .aq >annotations. However

Re: [RFC PATCH 1/2] riscv/spinlock: Strengthen implementations with fences

2018-03-07 Thread Andrea Parri
On Tue, Mar 06, 2018 at 06:02:28PM -0800, Palmer Dabbelt wrote: > On Mon, 05 Mar 2018 10:24:09 PST (-0800), parri.and...@gmail.com wrote: > >Current implementations map locking operations using .rl and .aq > >annotations. However, this mapping is unsound w.r.t. the kernel > >memory consistency mod

Re: [RFC PATCH 1/2] riscv/spinlock: Strengthen implementations with fences

2018-03-06 Thread Palmer Dabbelt
On Mon, 05 Mar 2018 10:24:09 PST (-0800), parri.and...@gmail.com wrote: Current implementations map locking operations using .rl and .aq annotations. However, this mapping is unsound w.r.t. the kernel memory consistency model (LKMM) [1]: Referring to the "unlock-lock-read-ordering" test reporte