Details
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
arm64/arm64/pmap.c | ||
---|---|---|
4011 | Is it possible to have dstmpte->wire_count > srcmpte->wire_count here? |
arm64/arm64/pmap.c | ||
---|---|---|
4011 | You'll find the same test in the x86 pmap implementations, and it has existed since the Dyson era. I believe that the motivation for it is related to the earlier test if (pmap_load(dst_pte) == 0 && Both of these tests only matter if pmap_copy() is used in places other than the implementation of fork, where we are starting with an empty destination pmap. |
arm64/arm64/pmap.c | ||
---|---|---|
4008 | Once upon a time, specifically, r15809, this goto did not exist, and so the below wired count check was the only way to exit the loop early. |
arm64/arm64/pmap.c | ||
---|---|---|
4011 | Here is the real reason for having the wire count test. Suppose that we are asked to pmap_copy the address range "[a, b)" *and* the only valid mapping within that range is at address "a". After copying the mapping at address "a", the wire counts will be equal and this test will allow us to avoid wasting time looking at subsequent mappings that must be invalid. |
Sync with https://reviews.freebsd.org/D20812, which applies a bunch of style fixes and one micro-optimization to the amd64 pmap_copy().
A kernel with this change has survived multiple, back-to-back "make -j8 buildworld"'s with no spurious bus errors.
arm64/arm64/pmap.c | ||
---|---|---|
3879 | Before I commit this, I'm going to remove the "XXX" here. To be clear, I'm keeping the sentence that follows, just removing the "XXX". |