Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2014 21:19:08 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r270629 - stable/10/sys/vm
Message-ID:  <201408252119.s7PLJ8Bs040125@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408252119.s7PLJ8Bs040125>