summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-08-25 21:19:08 +0000
committerkib <kib@FreeBSD.org>2014-08-25 21:19:08 +0000
commit35c4352f4cf19313edd692b31a703fbb51b80021 (patch)
tree71ac198db296e7c587d85d06db6ac6c1b2a282bb
parent982492098020b7969f4cbe23875a1ee6be782ebd (diff)
downloadFreeBSD-src-35c4352f4cf19313edd692b31a703fbb51b80021.zip
FreeBSD-src-35c4352f4cf19313edd692b31a703fbb51b80021.tar.gz
MFC r261647 (by alc):
Don't call vm_fault_prefault() on zero-fill faults.
-rw-r--r--sys/vm/vm_fault.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index b5dc373..19c0eee 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -656,6 +656,8 @@ vnode_locked:
}
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,
@@ -903,7 +905,8 @@ vnode_locked:
*/
pmap_enter(fs.map->pmap, vaddr, fs.m, prot,
fault_type | (wired ? PMAP_ENTER_WIRED : 0), 0);
- 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);
OpenPOWER on IntegriCloud