f3215338ef
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 |
||
---|---|---|
.. | ||
config.mk | ||
dtb.mk | ||
files | ||
files.amd64 | ||
files.arm | ||
files.arm64 | ||
files.i386 | ||
files.mips | ||
files.pc98 | ||
files.powerpc | ||
files.riscv | ||
files.sparc64 | ||
kern.mk | ||
kern.opts.mk | ||
kern.post.mk | ||
kern.pre.mk | ||
kmod_syms.awk | ||
kmod.mk | ||
ldscript.amd64 | ||
ldscript.arm | ||
ldscript.arm64 | ||
ldscript.i386 | ||
ldscript.mips | ||
ldscript.mips.cfe | ||
ldscript.mips.mips64 | ||
ldscript.mips.octeon1 | ||
ldscript.powerpc | ||
ldscript.powerpc64 | ||
ldscript.riscv | ||
ldscript.sparc64 | ||
Makefile.amd64 | ||
Makefile.arm | ||
Makefile.arm64 | ||
Makefile.i386 | ||
Makefile.mips | ||
Makefile.pc98 | ||
Makefile.powerpc | ||
Makefile.riscv | ||
Makefile.sparc64 | ||
makeLINT.mk | ||
makeLINT.sed | ||
newvers.sh | ||
NOTES | ||
options | ||
options.amd64 | ||
options.arm | ||
options.arm64 | ||
options.i386 | ||
options.mips | ||
options.pc98 | ||
options.powerpc | ||
options.riscv | ||
options.sparc64 | ||
systags.sh | ||
WITHOUT_SOURCELESS | ||
WITHOUT_SOURCELESS_HOST | ||
WITHOUT_SOURCELESS_UCODE |