Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man4/aio.4
Show All 21 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd July 15, 2016 | .Dd July 21, 2016 | ||||
.Dt AIO 4 | .Dt AIO 4 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm aio | .Nm aio | ||||
.Nd asynchronous I/O | .Nd asynchronous I/O | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
facility provides system calls for asynchronous I/O. | facility provides system calls for asynchronous I/O. | ||||
However, asynchronous I/O operations are only enabled for certain file | Asynchronous I/O operations are not completed synchronously by the | ||||
types by default. | calling thread. | ||||
Asynchronous I/O operations for other file types may block an AIO daemon | Instead, the calling thread invokes one system call to request an | ||||
indefinitely resulting in process and/or system hangs. | asynchronous I/O operation. | ||||
Asynchronous I/O operations can be enabled for all file types by setting | The status of a completed request is retrieved later via a separate | ||||
system call. | |||||
.Pp | |||||
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 | |||||
the | the | ||||
.Va vfs.aio.enable_unsafe | .Va vfs.aio.enable_unsafe | ||||
sysctl node to a non-zero value. | sysctl node to a non-zero value. | ||||
.Pp | .Pp | ||||
Asynchronous I/O operations on sockets and raw disk devices do not block | Asynchronous I/O operations on sockets and raw disk devices do not block | ||||
indefinitely and are enabled by default. | indefinitely and are always enabled. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Nm | .Nm | ||||
facility uses kernel processes | facility uses kernel processes | ||||
(also known as AIO daemons) | (also known as AIO daemons) | ||||
to service most asynchronous I/O requests. | to service most asynchronous I/O requests. | ||||
These processes are grouped into pools containing a variable number of | These processes are grouped into pools containing a variable number of | ||||
processes. | processes. | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |