path: root/share/man/man4/aio.4
diff options
authorJohn Baldwin <jhb@FreeBSD.org>2016-07-21 22:49:47 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-07-21 22:49:47 +0000
commit9c20dc9963aa998fbb18991f2048e9c4eaa8f98d (patch)
treebc6551d96b5311a4b57eb43c455a1ec8701a0cfb /share/man/man4/aio.4
parente0633de05aeed626226ced308ad63f2b885046bc (diff)
Add more documentation regarding unsafe AIO requests.
The asynchronous I/O changes made previously result in different behavior out of the box. Previously all AIO requests failed with ENOSYS / SIGSYS unless aio.ko was explicitly loaded. Now, some AIO requests complete and others ("unsafe" requests) fail with EOPNOTSUPP. Reword the introductory paragraph in aio(4) to add a general description of AIO before describing the vfs.aio.enable_unsafe sysctl. Remove the ENOSYS error description from aio_fsync(2), aio_read(2), and aio_write(2) and replace it with a description of EOPNOTSUPP. Remove the ENOSYS error description from aio_mlock(2). Log a message to the system log the first time a process requests an "unsafe" AIO request that fails with EOPNOTSUPP. This is modeled on the log message used for processes using the legacy pty devices. Reviewed by: kib (earlier version) MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7151
Notes: svn path=/head/; revision=303164
Diffstat (limited to 'share/man/man4/aio.4')
1 files changed, 15 insertions, 7 deletions
diff --git a/share/man/man4/aio.4 b/share/man/man4/aio.4
index 460b3c88c17a..efcfe24c288f 100644
--- a/share/man/man4/aio.4
+++ b/share/man/man4/aio.4
@@ -27,7 +27,7 @@
.\" $FreeBSD$
-.Dd July 15, 2016
+.Dd July 21, 2016
.Dt AIO 4
@@ -37,17 +37,25 @@
facility provides system calls for asynchronous I/O.
-However, asynchronous I/O operations are only enabled for certain file
-types by default.
-Asynchronous I/O operations for other file types may block an AIO daemon
-indefinitely resulting in process and/or system hangs.
-Asynchronous I/O operations can be enabled for all file types by setting
+Asynchronous I/O operations are not completed synchronously by the
+calling thread.
+Instead, the calling thread invokes one system call to request an
+asynchronous I/O operation.
+The status of a completed request is retrieved later via a separate
+system call.
+Asynchronous I/O operations on some file descriptor types may block an
+AIO daemon indefinitely resulting in process and/or system hangs.
+Operations on these file descriptor types are considered
+.Dq unsafe
+and disabled by default.
+They can be enabled by setting
.Va vfs.aio.enable_unsafe
sysctl node to a non-zero value.
Asynchronous I/O operations on sockets and raw disk devices do not block
-indefinitely and are enabled by default.
+indefinitely and are always enabled.