[PATCH RFC 2/2] arm64: atomics: add optimization support for implementations using near atomics

Will Deacon will at kernel.org
Tue Sep 23 03:04:17 PDT 2025


On Fri, Sep 19, 2025 at 05:17:47PM +0800, Yicong Yang wrote:
> From: Yicong Yang <yangyicong at hisilicon.com>
> 
> Atomic operations can be implemented in the CPU (near atomics) or
> in the interconnect or at the Subordinate holding the data (far
> atomics) [1]. The former one can be further optimized by prefetching
> the destination prior to the atomic operations, similar to the
> optimization for LL/SC operations mentioned in
> commit 0ea366f5e1b6 ("arm64: atomics: prefetch the destination word for write prior to stxr")

Sorry, but I'm strongly against this. The CPU needs to do better if
the system is configured for near atomics.

Will



More information about the linux-arm-kernel mailing list