Re: [PATCH v3 08/11] slub: Replace cmpxchg_double()

From
Arnd Bergmann <arnd@arndb.de>
Date
2023-05-25 10:52:48
Also in
linux-arch, linux-crypto, linux-iommu, linux-mm, linux-s390, lkml
Reply to
Peter Zijlstra, 2023-05-25
On Thu, May 25, 2023, at 12:29, Peter Zijlstra wrote:
On Wed, May 24, 2023 at 11:32:47AM +0200, Peter Zijlstra wrote:
quoted
On Mon, May 15, 2023 at 09:57:07AM +0200, Peter Zijlstra wrote:
This then also means I need to look at this_cpu_cmpxchg128 and
this_cpu_cmoxchg64 behaviour when we dont have the CPUID feature.

Because current verions seem to assume the instruction is present.
As far as I could tell when reviewing your series, this_cpu_cmpxchg64()
is always available on all architectures. Depending on compile-time
feature detection this would be either a native instruction that
is guaranteed to work, or the irq-disabled version. On x86, this
is handled at runtime with alternative_io().

this_cpu_cmpxchg128() clearly needed the system_has_cmpxchg128()
check, same as system_has_cmpxchg_double() today.

     Arnd
Thread (25 messages) 25 messages, 5 authors, last reply 2023-05-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help