pmap_copy() is used to speculatively create mappings, so those mappings should not have their access bit preset.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
The demotion code does not require superpage mappings to have their accessed bit set, so there is no reason not to clear it in pmap_copy().
sys/amd64/amd64/pmap.c | ||
---|---|---|
7792 | Why do you limit clearing to PG_MANAGED mappings? |
sys/amd64/amd64/pmap.c | ||
---|---|---|
7792 | We never actually test the accessed bit state on unmanaged mappings. We don't really care whether it represents the page having been accessed. So, typically, we preset the accessed bit on unmanaged mappings to eliminate the future cost of atomically setting it. Since most arm64 cores still use a software exception handler to set the accessed bit, presetting the accessed bit for unmanaged mappings arguably makes more sense on arm64 than it ever did on x86. |