Age | Commit message (Collapse) | Author |
|
Tests overflows without CQ_NODROP, and correct behavior on a ring
setup with CQ_NODROP. The latter backlogs events that otherwise
would have been dropped, and returns -EBUSY to an application trying
to submit new IO with a backlog pending.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
This missing define causes build failures on s390:
src/include/liburing.h:298: undefined reference to `io_uring_smp_mb'
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Add the command opcode, and add two test cases for it.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Not in a released version yet, plan for using the flags since we
already have the IORING_TIMEOUT_ABS flag.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Interface to the new file set update functionality.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Like io_uring_queue_init(), but allows passing in the whole parameter
structure, not just the flags.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Tests both existing functionality, but also the new sparse maps,
update/remove/add functionality.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
We made a kernel change to support timeouts properly on 32-bit
archs, update liburing to use __kernel_timespec instead of the
differently sized timespec.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
We lost the -ETIME return from a previous commit that optimized the
exported peek/wait cqe path, make sure that it works again.
Fixes: 20c929379461 ("Inline fast-path of io_uring_{wait,peek}_cqe()")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
For cases where we usually have completions available, it can be fairly
costly to always have to call into the liburing library. Ensure that we
handle the fast path of finding completions without needing a library
call.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
We also need the sigset for certain setups, and adding a third
option is pretty crazy. Since io_uring_wait_cqes_timeout() isn't
in a released version yet (and neither is io_uring_wait_cqes()),
make the necessary adjustments.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Allows to wait for a specific number of CQEs, which can be used more
optimally when we can inform the kernel of how many we are waiting
for.
Calling convention is the same as io_uring_wait_cqe(), we can only
return one cqe inline.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
io_uring_peek_batch_cqe(), get multiple cqe from the queue at once.
Returns the number of cqe gotten.
test/cq-peek-batch.c: tests io_uring_peek_batch_cqe()
Signed-off-by: James Rouzier <rouzier@gmail.com>
|
|
io_uring_cq_ready(), returns the number of completions that are ready.
test/cq-ready.c: tests io_uring_cq_ready
Signed-off-by: James Rouzier <rouzier@gmail.com>
|
|
Was just missing the sqe->timeout_flags, which are (as of yet) totally
unused.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Like io_uring_wait_cqe_timeout(), except this one takes an argument
for how many CQEs to ask for when waiting in the kernel.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
io_uring_sq_space_left(), returns the amount of space left in the submission queue.
test/sq-space_left.c tests io_uring_sq_space_left
Signed-off-by: James Rouzier <rouzier@gmail.com>
|
|
Like io_uring_wait_cqe(), except it accepts a timeout value as well. Note
that an sqe is used internally to handle the timeout. Applications using
this function must never set sqe->user_data to LIBURING_UDATA_TIMEOUT!
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Also unify all the command prep helpers, so they all use the same core
function for setting up the commands. It was a bit hit and miss before
this change if it was done manually, or through a helper.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Add support for the current TIMEOUT variant. This allows passing
in a timeout and event count, first of which will trigger the
completion of the timeout command.
If the timeout is hit, the command completes with cqe->res == -ETIME.
If the asked number of events complete first, the command completes
with cqe->res == 0.
test/timeout.c tests a variety of timeout conditions.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
We'll rework it for the final version, kill the early version
test case and liburing addition.
This reverts commits:
efb39e105afdb4dd5c0f1e964720cfa3cdcceb18
e4269d2c10586c03786df24d6382da99a956f03c
4652762d5be96e08a0ff8194de1e6f6d8127cee5
f102231b0fdbfe8587efda0b24c79a69ee4d8ba7
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
And associated command prep helper.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
|
|
This brings in the features flags.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
io_uring depends on the caller specifying the index into the array
of registered buffers for doing pre-mapped IO. Make this explicit
by requiring the caller to pass in this value for the
io_uring_prep_read_fixed() and io_uring_prep_write_fixed() helpers.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Rename the newly added arm barriers and READ/WRITE_ONCE
to avoid using popular names.
Signed-off-by: Julia Suvorova <jusual@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
The names of the barriers conflict with the namespaces of other projects
when trying to directly include liburing.h. Avoid using popular global
names.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Julia Suvorova <jusual@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
making liburing on arm64 platform failed. let's support it.
root@Kylin:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux buster/sid"
root@Kylin:/# gcc -v
gcc version 8.2.0 (Debian 8.2.0-20)
root@Kylin:~/liburing# make
make[1]: Entering directory '/root/liburing/src'
cc -g -fomit-frame-pointer -O2 -Wall -Iinclude/ -c -o setup.ol setup.c
In file included from include/liburing.h:14,
from setup.c:10:
include/liburing.h: In function 'io_uring_cq_advance':
include/liburing/barrier.h:73:2: warning: implicit declaration of function 'smp_mb'; did you mean 'smp_wmb'? [-Wimplicit-function-declaration]
smp_mb(); \
^~~~~~
include/liburing.h:111:3: note: in expansion of macro 'smp_store_release'
smp_store_release(cq->khead, *cq->khead + nr);
^~~~~~~~~~~~~~~~~
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
It is not possible to install barrier.h and compat.h into the top-level
/usr/include directly since they are likely to conflict with other
software. io_uring.h could be confused with the system's kernel header
file.
Put liburing headers into <liburing/*.h> so there is no chance of
conflicts or confusion.
Existing applications continue to build successfully since the location
of <liburing.h> is unchanged. In-tree examples and tests require
modification because src/liburing.h is moved to src/include/liburing.h.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|