Re: [PATCH v3 1/5] locking/qspinlock: Make arch_mcs_spin_unlock_contended more generic

From: Peter Zijlstra
Date: Tue Jul 16 2019 - 06:23:35 EST


On Mon, Jul 15, 2019 at 03:25:32PM -0400, Alex Kogan wrote:

> diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> index e14b32c69639..961781624638 100644
> --- a/kernel/locking/qspinlock.c
> +++ b/kernel/locking/qspinlock.c
> @@ -558,7 +558,7 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
> if (!next)
> next = smp_cond_load_relaxed(&node->next, (VAL));
>
> - arch_mcs_spin_unlock_contended(&next->locked);
> + arch_mcs_spin_unlock_contended(&next->locked, 1);
> pv_kick_node(lock, next);

My problem with this patch is that the above reads really daft. Should
we rename the whole function? arch_mcs_pass_lock() perhaps?