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)
Sun, Mar 31, 12:54 AM
Unknown Object (File)
Feb 26 2024, 12:07 PM
Unknown Object (File)
Feb 26 2024, 12:05 PM
Unknown Object (File)
Dec 22 2023, 9:20 PM
Unknown Object (File)
Dec 16 2023, 2:03 AM
Unknown Object (File)
Dec 12 2023, 10:52 AM
Unknown Object (File)
Nov 17 2023, 7:42 AM
Unknown Object (File)
Sep 5 2023, 3:16 AM
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

Lint
Lint Skipped
Unit
Tests Skipped

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

Is it worth asserting !workaround_erratum383 if PG_PROMOTED is set?

amd64/amd64/pmap.c
1858

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.