svn commit: r270629 - stable/10/sys/vm

Konstantin Belousov kib at FreeBSD.org
Mon Aug 25 21:19:09 UTC 2014


Author: kib
Date: Mon Aug 25 21:19:08 2014
New Revision: 270629
URL: http://svnweb.freebsd.org/changeset/base/270629

Log:
  MFC r261647 (by alc):
  Don't call vm_fault_prefault() on zero-fill faults.

Modified:
  stable/10/sys/vm/vm_fault.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_fault.c
==============================================================================
--- stable/10/sys/vm/vm_fault.c	Mon Aug 25 21:16:57 2014	(r270628)
+++ stable/10/sys/vm/vm_fault.c	Mon Aug 25 21:19:08 2014	(r270629)
@@ -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);


More information about the svn-src-stable mailing list