HomeFreeBSD

Invalidate the mapping before updating its physical address.

Description

Invalidate the mapping before updating its physical address.

Doing so ensures that all threads sharing the pmap have a consistent
view of the mapping. This fixes the problem described in the commit
log message for r329254 without the overhead of an extra fault in the
common case. (Once the riscv pmap_enter() implementation is similarly
modified, the workaround added in r329254 can be removed, reducing the
overhead of CoW faults.)

See also r335784 for amd64. The mips implementation of pmap_enter()
already reused the PV entry from the old mapping.

Reviewed by: kib, markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D16199

Details

Provenance
alcAuthored on
Reviewer
kib
Differential Revision
D16199: Address the COW problem in pmap_enter() on mips
Parents
rS336247: Transition to boot_env_to_howto and boot_howto_to_env in the boot
Branches
Unknown
Tags
Unknown