Re: svn commit: r358317 - head/sys/kern

2020-02-26 Thread Ravi Pokala
-Original Message-
From: Gleb Smirnoff 
Date: 2020-02-26, Wednesday at 13:55
To: Ravi Pokala 
Cc: , , 

Subject: Re: svn commit: r358317 - head/sys/kern

On Tue, Feb 25, 2020 at 12:02:29PM -0800, Ravi Pokala wrote:
R>   When sendfile_swapin() sweeps through pages in search for a bogus 
page
R>   skip first and last pages.  This is a micro optimisation.
R> 
R> Yes, but *why* skip the first and last pages?

We may have inserted bogus pages in the middle of a request. We never 
substitute
first or last.

-- 
Gleb Smirnoff

Oh god, "bogus_page" -- Panasas had to jump through a bunch of hoops involving 
bogus_page and our RAIDing-across-sectors GEOM class years ago. 

-Ravi (rpokala@)



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r358317 - head/sys/kern

2020-02-26 Thread Gleb Smirnoff
On Tue, Feb 25, 2020 at 12:02:29PM -0800, Ravi Pokala wrote:
R>   When sendfile_swapin() sweeps through pages in search for a bogus page
R>   skip first and last pages.  This is a micro optimisation.
R> 
R> Yes, but *why* skip the first and last pages?

We may have inserted bogus pages in the middle of a request. We never substitute
first or last.

-- 
Gleb Smirnoff
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r358317 - head/sys/kern

2020-02-25 Thread Ravi Pokala
-Original Message-
From:  on behalf of Gleb Smirnoff 

Date: 2020-02-25, Tuesday at 11:11
To: , , 

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)));



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358317 - head/sys/kern

2020-02-25 Thread Gleb Smirnoff
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)));
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"