Eliminate unnecessary invalidations of the entire TLB by pmap_remove().
Specifically, on mappings with PG_G set pmap_remove() not only performs the necessary per-page invlpg invalidations but also performs an unnecessary invalidation of the entire set of non-PG_G entries. Reviewed by: tegge
This commit is contained in:
parent
6b422e20c1
commit
fa8053e9a9
@ -1731,7 +1731,13 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
||||
sva += PAGE_SIZE) {
|
||||
if (*pte == 0)
|
||||
continue;
|
||||
anyvalid = 1;
|
||||
|
||||
/*
|
||||
* The TLB entry for a PG_G mapping is invalidated
|
||||
* by pmap_remove_pte().
|
||||
*/
|
||||
if ((*pte & PG_G) == 0)
|
||||
anyvalid = 1;
|
||||
if (pmap_remove_pte(pmap, pte, sva, ptpaddr))
|
||||
break;
|
||||
}
|
||||
|
@ -1719,7 +1719,13 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
||||
sva += PAGE_SIZE) {
|
||||
if (*pte == 0)
|
||||
continue;
|
||||
anyvalid = 1;
|
||||
|
||||
/*
|
||||
* The TLB entry for a PG_G mapping is invalidated
|
||||
* by pmap_remove_pte().
|
||||
*/
|
||||
if ((*pte & PG_G) == 0)
|
||||
anyvalid = 1;
|
||||
if (pmap_remove_pte(pmap, pte, sva))
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user