Re: [PATCH 02/17] powerpc/qspinlock: add mcs queueing for contended waiters

2022-11-10 Thread Nicholas Piggin
On Thu Nov 10, 2022 at 10:36 AM AEST, Jordan Niethe wrote: > On Thu, 2022-07-28 at 16:31 +1000, Nicholas Piggin wrote: > > [resend as utf-8, not utf-7] > > > > +/* > > + * Bitfields in the atomic value: > > + * > > + * 0: locked bit > > + * 16-31: tail cpu (+1) > > + */ > > +#define_Q_SE

Re: [PATCH 02/17] powerpc/qspinlock: add mcs queueing for contended waiters

2022-11-09 Thread Jordan Niethe
On Thu, 2022-07-28 at 16:31 +1000, Nicholas Piggin wrote: [resend as utf-8, not utf-7] > > +/* > + * Bitfields in the atomic value: > + * > + * 0: locked bit > + * 16-31: tail cpu (+1) > + */ > +#define _Q_SET_MASK(type) (((1U << _Q_ ## type ## _BITS) - 1)\ > +

Re: [PATCH 02/17] powerpc/qspinlock: add mcs queueing for contended waiters

2022-08-09 Thread Jordan NIethe
On Thu, 2022-07-28 at 16:31 +1000, Nicholas Piggin wrote: > > +/* > + * Bitfields in the atomic value: > + * > + * 0: locked bit > + * 16-31: tail cpu (+1) > + */ > +#define _Q_SET_MASK(type) (((1U << _Q_ ## type ## _BITS) - 1)\ > + << _Q_ ## typ

[PATCH 02/17] powerpc/qspinlock: add mcs queueing for contended waiters

2022-07-27 Thread Nicholas Piggin
This forms the basis of the qspinlock slow path. Like generic qspinlocks and unlike the vanilla MCS algorithm, the lock owner does not participate in the queue, only waiters. The first waiter spins on the lock word, then when the lock is released it takes ownership and unqueues the next waiter. Th