From owner-svn-src-head@FreeBSD.ORG Sun Feb 9 01:59:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B125E90; Sun, 9 Feb 2014 01:59:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 759EB1365; Sun, 9 Feb 2014 01:59:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s191xrUJ020103; Sun, 9 Feb 2014 01:59:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s191xr5r020102; Sun, 9 Feb 2014 01:59:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201402090159.s191xr5r020102@svn.freebsd.org> From: Alan Cox Date: Sun, 9 Feb 2014 01:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261647 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 01:59:53 -0000 Author: alc Date: Sun Feb 9 01:59:52 2014 New Revision: 261647 URL: http://svnweb.freebsd.org/changeset/base/261647 Log: 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. Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sun Feb 9 01:21:30 2014 (r261646) +++ head/sys/vm/vm_fault.c Sun Feb 9 01:59:52 2014 (r261647) @@ -652,6 +652,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, @@ -897,7 +899,8 @@ vnode_locked: * 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);