summaryrefslogtreecommitdiffstats
path: root/kernel/module-internal.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-10 11:22:30 -0700
committerJens Axboe <axboe@kernel.dk>2019-02-28 08:24:23 -0700
commit6c271ce2f1d572f7fa225700a13cfe7ced492434 (patch)
tree66518a025120aa751b1d3fe8631bf45ea3511c5c /kernel/module-internal.h
parent6b06314c47e141031be043539900d80d2c7ba10f (diff)
downloadlinux-6c271ce2f1d572f7fa225700a13cfe7ced492434.tar.gz
linux-6c271ce2f1d572f7fa225700a13cfe7ced492434.tar.bz2
linux-6c271ce2f1d572f7fa225700a13cfe7ced492434.zip
io_uring: add submission polling
This enables an application to do IO, without ever entering the kernel. By using the SQ ring to fill in new sqes and watching for completions on the CQ ring, we can submit and reap IOs without doing a single system call. The kernel side thread will poll for new submissions, and in case of HIPRI/polled IO, it'll also poll for completions. By default, we allow 1 second of active spinning. This can by changed by passing in a different grace period at io_uring_register(2) time. If the thread exceeds this idle time without having any work to do, it will set: sq_ring->flags |= IORING_SQ_NEED_WAKEUP. The application will have to call io_uring_enter() to start things back up again. If IO is kept busy, that will never be needed. Basically an application that has this feature enabled will guard it's io_uring_enter(2) call with: read_barrier(); if (*sq_ring->flags & IORING_SQ_NEED_WAKEUP) io_uring_enter(fd, 0, 0, IORING_ENTER_SQ_WAKEUP); instead of calling it unconditionally. It's mandatory to use fixed files with this feature. Failure to do so will result in the application getting an -EBADF CQ entry when submitting IO. Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/module-internal.h')
0 files changed, 0 insertions, 0 deletions