- Move assertions out of the main loop. This makes the assertion condition simpler and makes the code easier to follow IMO.
- Fix va_next updates. In some cases we were not doing the wraparound check before continuing the loop.
- Use the right va_next. In pmap_advise() and pmap_copy() we would step through 1G pages 2M at a time.
- Write "non-transparent" instead of "non-transient" in the assertion message. I believe this was the original intent.
Details
Details
- Reviewers
alc kib - Commits
- rS365906: Fix some nits in 1G page support in the amd64 pmap.
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 33628 Build 30871: arc lint + arc unit
Event Timeline
head/sys/amd64/amd64/pmap.c | ||
---|---|---|
6504 ↗ | (On Diff #77221) | Can't pmap_pml4e() now return NULL under LA57? |
6528 ↗ | (On Diff #77221) | I don't understand why we do this unconditionally. We don't use mp except in the then clause of the below if statement. |
6536 ↗ | (On Diff #77221) | Using PG_FRAME here will include X86_PG_PDE_PAT in the compared bits. |
6566 ↗ | (On Diff #77221) | Ditto. |
6572 ↗ | (On Diff #77221) | Ditto. |
6582 ↗ | (On Diff #77221) | I find it curious that the resident count is handled one way and the wired count another way. |
head/sys/amd64/amd64/pmap.c | ||
---|---|---|
6221 ↗ | (On Diff #77221) | Can't pmap_pml4e() now return NULL under LA57? |
head/sys/amd64/amd64/pmap.c | ||
---|---|---|
6536 ↗ | (On Diff #77221) | I believe we can actually make this assertion stronger and write KASSERT((origpte & PG_V) == 0 || ((origpte ^ pten) & ~(PG_W | PG_M)) == 0, (...)); |
head/sys/amd64/amd64/pmap.c | ||
---|---|---|
6536 ↗ | (On Diff #77221) | Why PG_RW or PG_NX cannot change ? And I am not sure about PAT. |