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

(cherry picked from commit d8b32da2354d2fd72ae017fd63affa3684786e1f)

Details

Provenance
markjAuthored on Oct 7 2024, 8:50 PM
Reviewer
dougm
Differential Revision
D46943: vm_page: Use atomic loads for cmpset loops
Parents
rG11432d8f0765: xen/blk{front,back}: fix usage of sector sizes different than 512b
Branches
Unknown
Tags
Unknown