Eliminate a redundant pmap_load() from pmap_remove_pages().

There is no reason why the pmap_invalidate_all() in pmap_remove_pages()
must be performed before the final PV list lock release.  Move it past
the lock release.

Eliminate a stale comment from pmap_page_test_mappings().  We implemented
a modified bit in r350004.

MFC after:	1 week
This commit is contained in:
alc 2019-11-10 05:22:01 +00:00
parent 7ad5aa93b3
commit b4dc5956c1

View File

@ -4434,7 +4434,6 @@ pmap_remove_pages(pmap_t pmap)
L2_BLOCK,
("Attempting to remove an invalid "
"block: %lx", tpte));
tpte = pmap_load(pte);
break;
case 2:
pte = pmap_l2_to_l3(pde, pv->pv_va);
@ -4552,17 +4551,15 @@ pmap_remove_pages(pmap_t pmap)
free_pv_chunk(pc);
}
}
pmap_invalidate_all(pmap);
if (lock != NULL)
rw_wunlock(lock);
pmap_invalidate_all(pmap);
PMAP_UNLOCK(pmap);
vm_page_free_pages_toq(&free, true);
}
/*
* This is used to check if a page has been accessed or modified. As we
* don't have a bit to see if it has been modified we have to assume it
* has been if the page is read/write.
* This is used to check if a page has been accessed or modified.
*/
static boolean_t
pmap_page_test_mappings(vm_page_t m, boolean_t accessed, boolean_t modified)