Re: [PATCH v3 2/5] locking/qspinlock: Refactor the qspinlock slow path

2019-07-16 Thread Peter Zijlstra
On Tue, Jul 16, 2019 at 10:53:02AM -0400, Alex Kogan wrote: > On Jul 16, 2019, at 6:20 AM, Peter Zijlstra wrote: > > > > On Mon, Jul 15, 2019 at 03:25:33PM -0400, Alex Kogan wrote: > > > >> +/* > >> + * set_locked_empty_mcs - Try to set the spinlock value to _Q_LOCKED_VAL, > >> + * and by doing

Re: [PATCH v3 2/5] locking/qspinlock: Refactor the qspinlock slow path

2019-07-16 Thread Alex Kogan
On Jul 16, 2019, at 6:20 AM, Peter Zijlstra wrote: > > On Mon, Jul 15, 2019 at 03:25:33PM -0400, Alex Kogan wrote: > >> +/* >> + * set_locked_empty_mcs - Try to set the spinlock value to _Q_LOCKED_VAL, >> + * and by doing that unlock the MCS lock when its waiting queue is empty >> + * @lock: Poi

Re: [PATCH v3 2/5] locking/qspinlock: Refactor the qspinlock slow path

2019-07-16 Thread Peter Zijlstra
On Mon, Jul 15, 2019 at 03:25:33PM -0400, Alex Kogan wrote: > +/* > + * set_locked_empty_mcs - Try to set the spinlock value to _Q_LOCKED_VAL, > + * and by doing that unlock the MCS lock when its waiting queue is empty > + * @lock: Pointer to queued spinlock structure > + * @val: Current value of

[PATCH v3 2/5] locking/qspinlock: Refactor the qspinlock slow path

2019-07-15 Thread Alex Kogan
Move some of the code manipulating the spin lock into separate functions. This would allow easier integration of alternative ways to manipulate that lock. Signed-off-by: Alex Kogan Reviewed-by: Steve Sistare --- kernel/locking/qspinlock.c | 40 ++-- 1 file ch