History

io_uring: add support for sqe links

With SQE links, we can create chains of dependent SQEs. One example would be queueing an SQE that's a read from one file descriptor, with the linked SQE being a write to another with the same set of buffers. An SQE link will not stall the pipeline, it'll just ensure that dependent SQEs aren't issued before the previous link has completed. Any error at submission or completion time will break the chain of SQEs. For completions, this also includes short reads or writes, as the next SQE could depend on the previous one being fully completed. Any SQE in a chain that gets canceled due to any of the above errors, will get an CQE fill with -ECANCELED as the error value.

Jens Axboe committed 7 years ago

Commit 9e645e11 parent 9d93a3f2 files · +194 −48Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+1−0
@@ -40,6 +40,7 @@ struct io_uring_sqe { · 39 unmodified lines
40 */40 */
41#define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */41#define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */
42#define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */42#define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */
43#define IOSQE_IO_LINK (1U << 2) /* links next sqe */
43 44
44/*45/*
45 * io_uring_setup() flags46 * io_uring_setup() flags