From owner-svn-src-head@freebsd.org Sat Oct 3 17:04:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E1B8A0E057; Sat, 3 Oct 2015 17:04:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C3C41B30; Sat, 3 Oct 2015 17:04:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t93H4rar007412; Sat, 3 Oct 2015 17:04:53 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t93H4rho007411; Sat, 3 Oct 2015 17:04:53 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201510031704.t93H4rho007411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 3 Oct 2015 17:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288617 - head/sys/kern 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.20 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: Sat, 03 Oct 2015 17:04:53 -0000 Author: alc Date: Sat Oct 3 17:04:52 2015 New Revision: 288617 URL: https://svnweb.freebsd.org/changeset/base/288617 Log: Perform a single batched update to the object's paging-in-progress count rather than updating it for each page. Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Oct 3 16:37:38 2015 (r288616) +++ head/sys/kern/vfs_bio.c Sat Oct 3 17:04:52 2015 (r288617) @@ -2050,11 +2050,10 @@ vfs_vmio_iodone(struct buf *bp) (intmax_t)foff, (uintmax_t)m->pindex)); vm_page_sunbusy(m); - vm_object_pip_subtract(obj, 1); foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; iosize -= resid; } - vm_object_pip_wakeupn(obj, 0); + vm_object_pip_wakeupn(obj, bp->b_npages); VM_OBJECT_WUNLOCK(obj); if (bogus && buf_mapped(bp)) { BUF_CHECK_MAPPED(bp); @@ -3923,10 +3922,9 @@ vfs_unbusy_pages(struct buf *bp) } else BUF_CHECK_UNMAPPED(bp); } - vm_object_pip_subtract(obj, 1); vm_page_sunbusy(m); } - vm_object_pip_wakeupn(obj, 0); + vm_object_pip_wakeupn(obj, bp->b_npages); VM_OBJECT_WUNLOCK(obj); }