Page MenuHomeFreeBSD

Refine the fix from r312954; add a PG_PROMOTED flag for marking promoted PDEs
ClosedPublic

Authored by alc on Feb 18 2017, 7:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 11, 10:35 AM
Unknown Object (File)
Mon, Dec 23, 6:47 AM
Unknown Object (File)
Dec 2 2024, 3:36 AM
Unknown Object (File)
Oct 24 2024, 6:59 PM
Unknown Object (File)
Oct 20 2024, 10:59 AM
Unknown Object (File)
Oct 17 2024, 9:22 PM
Unknown Object (File)
Sep 30 2024, 9:28 AM
Unknown Object (File)
Sep 24 2024, 2:08 PM
Subscribers
None

Details

Summary

Mark promoted PDEs with the new PG_PROMOTED flag so that the amd64 pmap knows whether lingering 4K page mappings need to be flushed on a PDE change that restricts or destroys the mapping. This allows the amd64 pmap to avoid unnecessary and costly range invalidations.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc retitled this revision from to Refine the fix from r312954; add a PG_PROMOTED flag for marking promoted PDEs.
alc updated this object.
alc edited the test plan for this revision. (Show Details)
alc added reviewers: kib, markj.
kib edited edge metadata.
This revision is now accepted and ready to land.Feb 18 2017, 9:03 PM
markj edited edge metadata.
markj added inline comments.
amd64/amd64/pmap.c
1858 โ†—(On Diff #25361)

Is it worth asserting !workaround_erratum383 if PG_PROMOTED is set?

amd64/amd64/pmap.c
1858 โ†—(On Diff #25361)

There are 2M page mappings that are not the result of promotion, e.g., pmap_enter_pde() and an upcoming patch that adds support for "psind == 1" to pmap_enter(). That said, the bug fixed by r312954 involved PG_G mappings and currently pmap_enter_pde() never creates PG_G mappings, so we would not yet call this function on anything but a promoted mapping. However, that is going to change before too long.

alc edited edge metadata.

Apply similar changes to the i386 pmap. There PG_AVAIL3 is unused, and we don't support EPT, so there is no potential conflict from using PG_AVAIL3.

Tweak the "spelling" in some comments for consistency with other parts of the amd64/i386 pmap.

This revision now requires review to proceed.Feb 19 2017, 8:14 PM
kib edited edge metadata.
This revision is now accepted and ready to land.Feb 19 2017, 8:31 PM
markj edited edge metadata.

I'm going to add the comment "PDE only" where I define PG_PROMOTED in pmap.h.

This revision was automatically updated to reflect the committed changes.