freebsd-skq/sys
avg fdda25ea79 read-behind / read-ahead support for zfs_getpages()
ZFS caches blocks it reads in its ARC, so in general the optional
pages are not as useful as with filesystems that read the data
directly into the target pages.  But still the optional pages
are useful to reduce the number of page faults and associated
VM / VFS / ZFS calls.
Another case that gets optimized (as a side effect) is paging in
from a hole.  ZFS DMU does not currently provide a convenient
API to check for a hole.  Instead it creates a temporary zero-filled
block and allows accessing it as if it were a normal data block.
Getting multiple pages one by one from a hole results in repeated
creation and destruction of the temporary block (and an associated
ARC header).

Tested with fsx using various supported blocks sizes from 512 bytes
to 128 KB and additionally 1 MB.

Please note that in illumos and ZoL they do not do the range-locking in
the page-in path. This is because ZFS has a double-caching problem
between ARC and page cache and that requires zfs_read() and zfs_write()
to consult pages in the page cache. So, in those functions they first
lock a range and then lock pages corresponding to the range. While in
the page-in (and maybe page-out) path they first lock the pages and then
would lock the range. So, they would have a deadlock.

I believe that FreeBSD does not have that problem, because the page-in
deals only with invalid pages while zfs_read() and zfs_write() need to
access only valid pages. They do not wait on a busy page unless it's
already valid.

Reviewed by:	kib
MFC after:	3 weeks
Differential Revision: https://reviews.freebsd.org/D14263
2018-02-16 06:59:35 +00:00
..
amd64 This change fixes duplicate detection of same IOMMU/AMD-Vi device for Ryzen with EFR support. 2018-02-16 05:17:00 +00:00
arm Rename the ACPI variant of the gicv2m driver from "gicv2m" to "gicv2m_acpi". 2018-02-15 15:46:14 +00:00
arm64 Make v_wire_count a per-cpu counter(9) counter. This eliminates a 2018-02-12 22:53:00 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam Report the number of remaining retries when we have an error that 2018-02-15 18:57:54 +00:00
cddl read-behind / read-ahead support for zfs_getpages() 2018-02-16 06:59:35 +00:00
compat Regen after r329322. 2018-02-15 18:32:11 +00:00
conf Add support for zstd-compressed user and kernel core dumps. 2018-02-13 19:28:02 +00:00
contrib This change fixes duplicate detection of same IOMMU/AMD-Vi device for Ryzen with EFR support. 2018-02-16 05:17:00 +00:00
crypto ccp(4): Store IV in output buffer in GCM software fallback when requested 2018-01-27 07:41:31 +00:00
ddb Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
dev mxge(4) should pass unhandled ioctls to ether_ioctl() 2018-02-15 03:22:04 +00:00
dts Add a skeleton Clock Manager for RPi2/3, and use that from pwm 2018-01-22 07:10:30 +00:00
fs {ext2|ufs}_readdir: Avoid setting negative ncookies. 2018-02-06 22:38:19 +00:00
gdb sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
geom gpart: append partition name to the underlying provider's physical path 2018-02-14 20:26:09 +00:00
gnu bwn(4): txpid2g/txpid5g[lh] are not defined after sromrev 7; the default 2018-02-13 17:43:54 +00:00
i386 x86 pmap: Make memory mapped via pmap_qenter() non-executable 2018-02-14 23:35:47 +00:00
isa Add ISA PNP tables to ISA drivers. Fix a few incidental comments. 2018-01-29 00:22:30 +00:00
kern Reduce duplication in __acl_*_(file|link). 2018-02-15 21:24:43 +00:00
kgssapi kgssapi: Remove trivial deadcode 2018-02-14 00:12:03 +00:00
libkern libkern: use nul for terminating char rather than 0 2018-02-13 19:17:48 +00:00
mips Make v_wire_count a per-cpu counter(9) counter. This eliminates a 2018-02-12 22:53:00 +00:00
modules Import the mthca kernel side infiniband driver from Linux 4.9 and fix 2018-02-13 17:04:34 +00:00
net BPF: Switch to 32 bit compatible mode only when thread is 32 bit 2018-01-25 12:13:41 +00:00
net80211 net80211: sanitize input for ieee80211_output() 2017-12-30 00:40:34 +00:00
netgraph ng_pppoe(8): add support for user-supplied Host-Uniq tag. 2018-02-14 21:17:44 +00:00
netinet Reinitialize IP header length after checksum calculation. It is used 2018-02-10 10:13:17 +00:00
netinet6 Update the MTU in affected routes when IPv6 RA changes the MTU 2018-02-12 19:49:20 +00:00
netipsec Adopt revision 1.76 and 1.77 from NetBSD: 2018-01-24 19:48:25 +00:00
netpfil Remove duplicate #include <netinet/ip_var.h>. 2018-02-07 19:12:05 +00:00
netsmb Unsign some values related to allocation. 2018-01-22 02:08:10 +00:00
nfs Modernize nfssvc(2) registartion. 2018-02-08 20:09:42 +00:00
nfsclient style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Use syscall_helper_register() to register syscalls and initialize though 2018-02-10 01:09:22 +00:00
ofed Import the mthca kernel side infiniband driver from Linux 4.9 and fix 2018-02-13 17:04:34 +00:00
opencrypto Move per-operation data out of the csession structure. 2018-01-26 23:21:50 +00:00
powerpc PPC64: Get the timestap from the proper OF field 2018-02-14 02:51:28 +00:00
riscv Make v_wire_count a per-cpu counter(9) counter. This eliminates a 2018-02-12 22:53:00 +00:00
rpc Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
security Reduce duplication in __mac_*_(file|link)(2) implementation. 2018-02-15 18:57:22 +00:00
sparc64 Make v_wire_count a per-cpu counter(9) counter. This eliminates a 2018-02-12 22:53:00 +00:00
sys Get rid of the requirement to include SysV IPC headers with _KERNEL 2018-02-16 01:33:01 +00:00
teken sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tests
tools Avoid using \$. It's an unknown escape sequence. Some awks warn about 2018-01-28 05:13:08 +00:00
ufs The goal of this change is to prevent accidental foot shooting by 2018-02-08 23:06:58 +00:00
vm Cleanup unused page argument for vm_reserv_break(). 2018-02-14 00:34:02 +00:00
x86 xen: fix smp boot after r328157 2018-02-15 07:23:41 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00