Page MenuHomeFreeBSD

pmap: On a failed fcmpset don't repeat tests that won't change
ClosedPublic

Authored by alc on Jul 3 2021, 11:47 PM.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alc requested review of this revision.Jul 3 2021, 11:47 PM

On arm64, the new pmap code is smaller by 60 bytes.

This revision is now accepted and ready to land.Jul 4 2021, 10:57 AM

Is it possible for the hardware to change the AF or DBM flags between loading the pte and the fcmpset in the arm64 pmap?

Is it possible for the hardware to change the AF or DBM flags between loading the pte and the fcmpset in the arm64 pmap?

The hardware can change the AF bit from 0 to 1. The hardware does not change the DBM bit, only the OS does. If the DBM bit is 1, then the hardware can change ATTR_S1_AP(ATTR_S1_AP_RO) to ATTR_S1_AP(ATTR_S1_AP_RW) when the mapping is first written through, which amounts to changing a bit from 1 to 0.