HomeFreeBSD

vm_page: Use atomic loads for cmpset loops

Description

vm_page: Use atomic loads for cmpset loops

Make sure that the compiler loads the initial value value only once.
Because atomic_fcmpset is used to load the value for subsequent
iterations, this is probably not needed, but we should not rely on that.

I verified that code generated for an amd64 GENERIC kernel does not
change.

Reviewed by: dougm, alc, kib
Tested by: pho
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D46943

Details

Provenance
markjAuthored on Oct 7 2024, 8:50 PM
Reviewer
dougm
Differential Revision
D46943: vm_page: Use atomic loads for cmpset loops
Parents
rG6684779b3215: capsicum-test: rights are propagated on accept(2)
Branches
Unknown
Tags
Unknown