Make pmap_is_prefaultable() more TLB friendly. Specifically, make it use
the kernel's direct map instead of the pmap's recursive mapping to access the lowest level in the page table. The direct map is preferable for two reasons: (1) The TLB is more likely to hold the required direct mapping because pmap_enter() has already used the direct map to access a nearby PTE and (2) loading a direct mapping into the TLB involves walking only 2 or 3 levels of the page table instead of 4.
This commit is contained in:
parent
00c36da743
commit
021a700f2a
@ -3104,7 +3104,7 @@ pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr)
|
||||
PMAP_LOCK(pmap);
|
||||
pde = pmap_pde(pmap, addr);
|
||||
if (pde != NULL && (*pde & PG_V)) {
|
||||
pte = vtopte(addr);
|
||||
pte = pmap_pde_to_pte(pde, addr);
|
||||
rv = (*pte & PG_V) == 0;
|
||||
}
|
||||
PMAP_UNLOCK(pmap);
|
||||
|
Loading…
Reference in New Issue
Block a user