Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-28 Thread Peter Zijlstra
On Thu, Jan 28, 2021 at 08:36:24AM +0100, Alexander Sverdlin wrote: > >> diff --git a/kernel/locking/mcs_spinlock.h b/kernel/locking/mcs_spinlock.h > >> index 5e10153..10e497a 100644 > >> --- a/kernel/locking/mcs_spinlock.h > >> +++ b/kernel/locking/mcs_spinlock.h > >> @@ -89,6 +89,11 @@ void mcs_

Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Alexander Sverdlin
Hi! On 27/01/2021 23:43, Peter Zijlstra wrote: > On Wed, Jan 27, 2021 at 09:01:08PM +0100, Alexander A Sverdlin wrote: >> From: Alexander Sverdlin >> >> Ensure writes are pushed out of core write buffer to prevent waiting code >> on another cores from spinning longer than necessary. > Our smp_wmb

Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Alexander Sverdlin
Hi! On 27/01/2021 23:21, Will Deacon wrote: > On Wed, Jan 27, 2021 at 09:01:08PM +0100, Alexander A Sverdlin wrote: >> From: Alexander Sverdlin >> >> Ensure writes are pushed out of core write buffer to prevent waiting code >> on another cores from spinning longer than necessary. >> >> 6 threads

Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 09:01:08PM +0100, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > Ensure writes are pushed out of core write buffer to prevent waiting code > on another cores from spinning longer than necessary. > > 6 threads running tight spinlock loop competing for the same

Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Peter Zijlstra
On Wed, Jan 27, 2021 at 09:01:08PM +0100, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > Ensure writes are pushed out of core write buffer to prevent waiting code > on another cores from spinning longer than necessary. Our smp_wmb() as defined does not have that property. You're rely

[PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Alexander A Sverdlin
From: Alexander Sverdlin Ensure writes are pushed out of core write buffer to prevent waiting code on another cores from spinning longer than necessary. 6 threads running tight spinlock loop competing for the same lock on 6 cores on MIPS/Octeon do 100 iterations... before the patch in:4