-----Original Message-----
From: <[email protected]> on behalf of Gleb Smirnoff
<[email protected]>
Date: 2020-02-25, Tuesday at 11:11
To: <[email protected]>, <[email protected]>,
<[email protected]>
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)));
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"