Thread (1 message) 1 message, 1 author, 2017-03-03

Re: [PATCH 0/7] Non-blocking AIO

From: Michael Kerrisk <hidden>
Date: 2017-03-03 10:52:19
Also in: linux-fsdevel

[CC += linux-api]

Hello Goldwyn,

Since this is a kernel-user-space API change, please CC linux-api@
(and for future iterations of this patch series).

The kernel source file Documentation/SubmitChecklist notes that all
Linux kernel patches that change userspace interfaces should be CCed
to linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, so that the various parties who are
interested in API changes are informed. For further information, see
https://www.kernel.org/doc/man-pages/linux-api-ml.html

Cheers,

Michael



On Tue, Feb 14, 2017 at 3:45 AM, Goldwyn Rodrigues [off-list ref] wrote:
This series adds nonblocking feature to asynchronous I/O writes.
io_submit() can be delayed because of a number of reason:
 - Block allocation for files
 - Data writebacks for direct I/O
 - Sleeping because of waiting to acquire i_rwsem
 - Congested block device

The goal of the patch series is to return -EAGAIN/-EWOULDBLOCK if
any of these conditions are met. This way userspace can push most
of the write()s to the kernel to the best of its ability to complete
and if it returns -EAGAIN, can defer it to another thread.

In order to enable this, IOCB_FLAG_NONBLOCKING is introduced in
uapi/linux/aio_abi.h which translates to IOCB_BLOCKING for struct iocb.

This feature is provided for direct I/O of asynchronous I/O only. I have
tested it against xfs, ext4, and btrfs.

--
Goldwyn


-- 
Michael Kerrisk Linux man-pages maintainer;
http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface", http://blog.man7.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help