Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Oct 2015 17:04:53 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288617 - head/sys/kern
Message-ID:  <201510031704.t93H4rho007411@repo.freebsd.org>

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



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