Don't call vm_fault_prefault() on zero-fill faults. It's a waste of time.
Successful prefaults after a zero-fill fault are extremely rare.
This commit is contained in:
parent
ca3eec15c0
commit
7b9b301c6b
@ -652,6 +652,8 @@ RetryFault:;
|
||||
}
|
||||
PCPU_INC(cnt.v_zfod);
|
||||
fs.m->valid = VM_PAGE_BITS_ALL;
|
||||
/* Don't try to prefault neighboring pages. */
|
||||
faultcount = 1;
|
||||
break; /* break to PAGE HAS BEEN FOUND */
|
||||
} else {
|
||||
KASSERT(fs.object != next_object,
|
||||
@ -897,7 +899,8 @@ RetryFault:;
|
||||
* won't find it (yet).
|
||||
*/
|
||||
pmap_enter(fs.map->pmap, vaddr, fault_type, fs.m, prot, wired);
|
||||
if ((fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && wired == 0)
|
||||
if (faultcount != 1 && (fault_flags & VM_FAULT_CHANGE_WIRING) == 0 &&
|
||||
wired == 0)
|
||||
vm_fault_prefault(&fs, vaddr, faultcount, reqpage);
|
||||
VM_OBJECT_WLOCK(fs.object);
|
||||
vm_page_lock(fs.m);
|
||||
|
Loading…
Reference in New Issue
Block a user