Eliminate inconsequential differences between i386's pmap_enter() and amd64's. For example, fully construct the new PTE before entering the critical section. This change is a stepping stone to psind == 1 support.
Details
Ask Peter for help. :-)
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
If nothing else. the new version is 96 bytes smaller.
Before:
# size /local/obj/freebsd/base/head/i386.i386/sys/GENERIC-NODEBUG/pmap.o text data bss dec hex filename 40523 1020 408 41951 0xa3df /local/obj/freebsd/base/head/i386.i386/sys/GENERIC-NODEBUG/pmap.o
After:
# size /local/obj/freebsd/base/head/i386.i386/sys/GENERIC-NODEBUG/pmap.o text data bss dec hex filename 40427 1020 408 41855 0xa37f /local/obj/freebsd/base/head/i386.i386/sys/GENERIC-NODEBUG/pmap.o
FWIW, I started working on pmap_enter(psind = 1) for arm64 in the background. Had you already started working on that?
FYI, on amd64, over the course of a buildworld, a few 2MB regions within the code segment of clang will be promoted to superpages. Essentially, I/O clustering on page faults, fills out theses superpages even if we don't execute instructions from each of the pages. And, then, pmap_enter_object() premaps these 2MB regions as superpages on subsequent executions of clang. However, on arm64, I believe that the default layout used by the new linker is going to sabotage this, because the code segment no longer starts at a 2MB-aligned address.