svn commit: r358317 - head/sys/kern

Gleb Smirnoff glebius at FreeBSD.org
Tue Feb 25 19:11:22 UTC 2020


Author: glebius
Date: Tue Feb 25 19:11:20 2020
New Revision: 358317
URL: https://svnweb.freebsd.org/changeset/base/358317

Log:
  When sendfile_swapin() sweeps through pages in search for a bogus page
  skip first and last pages.  This is a micro optimisation.

Modified:
  head/sys/kern/kern_sendfile.c

Modified: head/sys/kern/kern_sendfile.c
==============================================================================
--- head/sys/kern/kern_sendfile.c	Tue Feb 25 19:04:39 2020	(r358316)
+++ head/sys/kern/kern_sendfile.c	Tue Feb 25 19:11:20 2020	(r358317)
@@ -462,7 +462,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i
 		 * Restore the valid page pointers.  They are already
 		 * unbusied, but still wired.
 		 */
-		for (j = i; j < i + count; j++)
+		for (j = i + 1; j < i + count - 1; j++)
 			if (pa[j] == bogus_page) {
 				pa[j] = vm_page_lookup(obj,
 				    OFF_TO_IDX(vmoff(j, off)));


More information about the svn-src-head mailing list