summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJeff Moyer <jmoyer@redhat.com>2019-02-14 18:20:33 -0500
committerJens Axboe <axboe@kernel.dk>2019-02-14 17:13:44 -0700
commit10a57a0823789e7fb76f26073edc37200aa356d9 (patch)
tree7d00179c91fc28ecc35fb3f1edab1ce7be672169 /man
parent1a3020e7b491c9df741b2b1e6f0b44e8b21f66dd (diff)
io_uring_enter.2: clarify min_complete
min_complete means slightly different things depending on how the ring was setup. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'man')
-rw-r--r--man/io_uring_enter.233
1 files changed, 20 insertions, 13 deletions
diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 92cc77e..0e6ca61 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -37,21 +37,28 @@ the
bit is set in
.I flags,
then the system call will attempt to wait for
-.I min_events
-I/O completions. Note that it is valid to specify
-.B IORING_ENTER_GETEVENTS
-in
-.I flags
-and pass in
.I min_complete
-as 0 at the same time. This allows the kernel to return already
-completed events without waiting. This is useful only when the
-io_uring instance was configured for polling (by specifying the
+event completions before returning. If the io_uring instance was
+configured for polling, by specifying
+.B IORING_SETUP_IOPOLL
+in the call to
+.BR io_uring_setup (2),
+then min_complete has a slightly different meaning. Passing a value
+of 0 instructs the kernel to return any events which are already complete,
+without blocking. If
+.I min_complete
+is a non-zero value, the kernel will still return immediately if any
+completion events are available. If no event completions are
+available, then the call will poll either until one or more
+completions become available, or until the process has exceeded its
+scheduler time slice.
+
+Note that, for interrupt driven I/O (where
.B IORING_SETUP_IOPOLL
-flag in
-.BR io_uring_setup(2)),
-as for IRQ driven I/O, the application can just check the completion
-queue without entering the kernel.
+was not specified in the call to
+.BR io_uring_setup (2)),
+an application may check the completion queue for event completions
+without entering the kernel at all.
.PP
When the system call returns that a certain amount of SQEs have been
consumed and submitted, it's safe to reuse SQE entries in the ring. This is