freebsd-nq/sys/modules
John Baldwin f3215338ef Refactor the AIO subsystem to permit file-type-specific handling and
improve cancellation robustness.

Introduce a new file operation, fo_aio_queue, which is responsible for
queueing and completing an asynchronous I/O request for a given file.
The AIO subystem now exports library of routines to manipulate AIO
requests as well as the ability to run a handler function in the
"default" pool of AIO daemons to service a request.

A default implementation for file types which do not include an
fo_aio_queue method queues requests to the "default" pool invoking the
fo_read or fo_write methods as before.

The AIO subsystem permits file types to install a private "cancel"
routine when a request is queued to permit safe dequeueing and cleanup
of cancelled requests.

Sockets now use their own pool of AIO daemons and service per-socket
requests in FIFO order.  Socket requests will not block indefinitely
permitting timely cancellation of all requests.

Due to the now-tight coupling of the AIO subsystem with file types,
the AIO subsystem is now a standard part of all kernels.  The VFS_AIO
kernel option and aio.ko module are gone.

Many file types may block indefinitely in their fo_read or fo_write
callbacks resulting in a hung AIO daemon.  This can result in hung
user processes (when processes attempt to cancel all outstanding
requests during exit) or a hung system.  To protect against this, AIO
requests are only permitted for known "safe" files by default.  AIO
requests for all file types can be enabled by setting the new
vfs.aio.enable_usafe sysctl to a non-zero value.  The AIO tests have
been updated to skip operations on unsafe file types if the sysctl is
zero.

Currently, AIO requests on sockets and raw disks are considered safe
and are enabled by default.  aio_mlock() is also enabled by default.

Reviewed by:	cem, jilles
Discussed with:	kib (earlier version)
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D5289
2016-03-01 18:12:14 +00:00
..
3dfx
3dfx_linux
aac
aacraid
accf_data
accf_dns
accf_http
acl_nfs4
acl_posix1e
acpi
ae
aesni
age
agp
aha
ahb
ahci ahci_generic.c needs ofw_bus_if.h, add it to the module. 2015-12-08 20:05:27 +00:00
aic
aic7xxx
alc
ale
alq
am335x_dmtpps
amdsbwd
amdtemp
amr
an
aout
apm
ar71xx
arcmsr
arcnet
asmc
ata
ath Add initial ar9300 HAL support for the spectral scan mode. 2015-12-02 05:36:45 +00:00
ath_ahb
ath_pci
autofs
auxio
bce
bfe
bge
bhnd Add modules support for the bhnd code. 2016-02-26 03:34:32 +00:00
bios
bktr
bm
bridgestp
bwi
bwn
bxe Upgrade the firmware carried in driver and loaded during hardware 2016-02-25 22:44:00 +00:00
cam Fix make depend 2015-12-08 07:39:39 +00:00
canbepm
canbus
cardbus
carp
cas
cbb
cc
cd9660
cd9660_iconv
ce
cfi
ciss
cloudabi
cloudabi64
cm
cmx
coff
coretemp
cp
cpsw
cpuctl
cpufreq
crypto Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c 2015-12-27 17:33:59 +00:00
cryptodev Remove unneeded includes of opt_kdtrace.h. 2015-11-22 02:01:01 +00:00
cs
ct
ctau
ctl
cuse
cx
cxgb
cxgbe cxgbe(4): Update T5 and T4 firmwares to 1.15.28.0. 2016-03-01 02:36:50 +00:00
dc
dcons
dcons_crom
de
digi
dpms
dpt
drm
drm2 Build all of sys/modules with SUBDIR_PARALLEL. 2015-11-10 17:15:36 +00:00
dtb Update of the Allwinner drivers to: 2016-02-10 09:19:29 +00:00
dtrace
dummynet
ed
elink
em
en
ep
epic
esp
et
ex
exca
ext2fs ext2fs: Bring back the htree dir_index implementation. 2016-01-21 14:50:28 +00:00
fatm
fdc
fdescfs
fe
filemon DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
firewire
firmware
fuse
fxp
gem
geom Obsolete mkulzma(8) and geom_uncompress(4), their functionality 2016-02-24 00:39:36 +00:00
glxiic
glxsb
gpio
hatm
hifn
hme
hpt27xx
hptiop
hptmv
hptnr
hptrr
hwpmc
hyperv hyperv/utils: Code rearrange and cleanup 2016-02-24 05:01:18 +00:00
i2c MIPS also needs ofw_bus_if.h in some cases. 2016-01-20 21:54:43 +00:00
ibcore
ibcs2
ichwd
ida
ie
if_bridge
if_disc
if_edsc
if_enc Overhaul if_enc(4) and make it loadable in run-time. 2015-11-25 07:31:59 +00:00
if_epair
if_gif
if_gre
if_lagg
if_me
if_ndis
if_stf
if_tap
if_tun
if_vlan
if_vxlan
igb
iir
imgact_binmisc
io
ioat
ip6_mroute_mod
ip_mroute_mod
ipdivert
ipfilter
ipfw
ipfw_nat
ipmi
ipoib Don't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h 2015-11-22 23:07:07 +00:00
ips
ipw
ipwfw
isci
iscsi
iscsi_initiator
isp
ispfw Rip off target mode support for parallel SCSI QLogic adapters. 2015-11-23 10:06:19 +00:00
iwi
iwifw
iwm
iwmfw
iwn
iwnfw
ix Add some missing dependencies on pci_iov_if.h. 2016-01-20 16:45:39 +00:00
ixgb
ixl
ixlv Add some missing dependencies on pci_iov_if.h. 2016-01-20 16:45:39 +00:00
ixv Add some missing dependencies on pci_iov_if.h. 2016-01-20 16:45:39 +00:00
jme
joy
kbdmux
kgssapi
kgssapi_krb5
khelp
krpc
ksyms
le
lge
libalias
libiconv
libmbpool
libmchain
linprocfs
linsysfs
linux pass -fPIC to the assembler, not linker 2016-02-25 19:26:14 +00:00
linux64 pass -fPIC to the assembler, not linker 2016-02-25 19:26:14 +00:00
linux_common
linuxkpi
lmc
lpt
mac_biba
mac_bsdextended
mac_ifoff
mac_lomac
mac_mls
mac_none
mac_partition
mac_portacl
mac_seeotheruids
mac_stub
mac_test
malo
mcd
md
mdio [mdio] migrate mdiobus out of etherswitch and into a top-level device of its own. 2015-12-26 02:31:39 +00:00
mem
mfi
mii
mlx
mlx4
mlx4ib
mlx5 Update the mlx5 shared driver code to the latest version, which 2015-12-07 13:16:48 +00:00
mlx5en Add full support for Receive Side Scaling, RSS, to the mlx5en 2015-12-07 12:38:51 +00:00
mlxen Convert the mlxen driver to use the BUSDMA(9) APIs instead of 2015-12-03 14:56:17 +00:00
mly
mmc
mmcsd
mpr
mps
mpt
mqueue
mrsas
msdosfs
msdosfs_iconv
mse
msk
mthca
mvs
mwl
mwlfw
mxge
my
nand
nandfs
nandsim
ncr
ncv
ndis
netfpga10g
netgraph Build all of sys/modules with SUBDIR_PARALLEL. 2015-11-10 17:15:36 +00:00
netmap
nfe
nfscl
nfscommon
nfsd
nfslock
nfslockd
nfssvc
nge
nmdm
nsp
ntb
nullfs
nvd
nvme
nvram
nxge
oce
opensolaris
otus
otusfw
ow
padlock
padlock_rng
patm
pccard
pcfclock
pcn
pf
pflog
pfsync
plip
pmc
pms
powermac_nvram
ppbus
ppc
ppi
pps
procfs
proto
pseudofs
pst
pty
puc
qlxgb
qlxgbe
qlxge
ral
ralfw
random_fortuna
random_other
random_yarrow
rc
rc4
rccgpio
rdma
rdrand_rng
re
reiserfs
rl
rndtest
rp
rtwn [rtwn] add rtwn module directory. 2015-12-31 23:48:07 +00:00
rtwnfw [rtwn] Add rtwn firmware and driver module. 2015-12-31 22:33:32 +00:00
s3
safe
sbni
scc
scd
scsi_low
sdhci
sdhci_pci
sem
send
sf
sfxge sfxge: add accessors for license-related MCDI calls to common code 2016-01-14 09:19:28 +00:00
sge
si
siba_bwn
siftr
siis
sio
sis
sk
smbfs
sn
snc
snp
sound
speaker
splash
sppp
ste
stg
stge
streams
svr4
sym
syscons 17 years and change after I wrote warp_saver, here's a simple plasma effect 2016-01-01 04:04:40 +00:00
sysvipc
tcp/fastpath Fix 'make depend' 2015-12-21 09:38:45 +00:00
tests Fix 'make depend' 2015-11-17 18:28:56 +00:00
ti
tl
tmpfs
toecore
tpm
trm
tsec
twa
twe
tws
tx
txp
uart Fix make depend 2015-11-29 12:23:08 +00:00
ubsec
ubser
uchcom
ucycom
udf
udf_iconv
ufs
unionfs
usb urtwn: add an option to compile the driver without firmware specific code 2016-02-22 00:48:53 +00:00
utopia
vesa
vge
viawd
videomode
virtio
vkbd
vmm
vmware
vpo
vr
vte
vx
vxge
wb
wbwd
wds
wi
wl
wlan
wlan_acl
wlan_amrr
wlan_ccmp
wlan_rssadapt
wlan_tkip
wlan_wep
wlan_xauth
wpi
wpifw
wtap
x86bios
xe
xl
zfs Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c 2015-12-27 17:33:59 +00:00
zlib
Makefile Refactor the AIO subsystem to permit file-type-specific handling and 2016-03-01 18:12:14 +00:00
Makefile.inc Build all of sys/modules with SUBDIR_PARALLEL. 2015-11-10 17:15:36 +00:00