svn commit: r358317 - head/sys/kern

Ravi Pokala rpokala at freebsd.org
Tue Feb 25 20:02:33 UTC 2020


-----Original Message-----
From: <owner-src-committers at freebsd.org> on behalf of Gleb Smirnoff <glebius at FreeBSD.org>
Date: 2020-02-25, Tuesday at 11:11
To: <src-committers at freebsd.org>, <svn-src-all at freebsd.org>, <svn-src-head at freebsd.org>
Subject: svn commit: r358317 - head/sys/kern

    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.

Yes, but *why* skip the first and last pages?

-Ravi

    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