io_uring: add IORING_SETUP_SCHED_SUBMIT support for SQPOLL
authorJens Axboe <axboe@kernel.dk>
Mon, 24 Jun 2024 20:18:36 +0000 (14:18 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 Oct 2024 15:09:23 +0000 (09:09 -0600)
commit4a8a32c827d89a37d7a58ee993220407d7c54395
tree302dd40dd82049188a20ab3c964356bd06a5ad8b
parent32c8bb5443596b1b6ff7e67a4c62fe9fd48e2e46
io_uring: add IORING_SETUP_SCHED_SUBMIT support for SQPOLL

For SQPOLL, this enables automatic submission of requests queued for the
SQPOLL thread when the application task schedules out, regardless of
whether or not the SQPOLL is actively running or currently sleeping. If
it's sleeping, it'll get woken automatically when the issuing task goes
to sleep.

If IORING_SETUP_SCHED_SUBMIT is set with SQPOLL, the
IORING_SQ_NEED_WAKEUP flag is no longer being set when the SQPOLL thread
goes to sleep. This isn't necessary anymore, as the SQPOLL thread will
get woken automatically when the issuing task goes to sleep or schedules
out.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring.h
include/linux/io_uring_types.h
include/uapi/linux/io_uring.h
io_uring/io_uring.c
io_uring/sqpoll.c
io_uring/tctx.c
kernel/sched/core.c