Re: [PATCH 07/24] alpha: select ARCH_SUPPORTS_ATOMIC_RMW

From: Magnus Lindholm

Date: Wed Sep 02 2026 - 02:18:08 EST


Hi Matt,

On Tue, Sep 1, 2026 at 5:51 PM Matt Turner <mattst88@xxxxxxxxx> wrote:
>
> Alpha has native LL/SC instructions (LDL_L/STL_C, LDQ_L/STQ_C) that
> provide atomic read-modify-write capability, and already selects
> ARCH_HAVE_NMI_SAFE_CMPXCHG.
>
> Selecting ARCH_SUPPORTS_ATOMIC_RMW enables MUTEX_SPIN_ON_OWNER and
> RWSEM_SPIN_ON_OWNER on SMP, allowing optimistic spinning on contended
> locks rather than immediately sleeping.
>

I tested this on an AlphaServer ES40 with four CPUs and
CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_MUTEXES=y, and
CONFIG_DEBUG_RWSEMS=y.

Both the mutex_lock and rwsem_lock locktorture tests completed
successfully under contention across all four CPUs.

Tested-by: Magnus Lindholm <linmag7@xxxxxxxxx>
Reviewed-by: Magnus Lindholm <linmag7@xxxxxxxxx>

Regards,
Magnus