io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_COOP_TASKRUN is used
authorJens Axboe <axboe@kernel.dk>
Tue, 26 Apr 2022 01:49:03 +0000 (19:49 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Apr 2022 14:39:35 +0000 (08:39 -0600)
commita933a9031e40c972c24ce6406e7cea73657728a5
tree2ce313a50f555588ccb988f75525124a310690c0
parent35ac0da1d1346d182003db278c2d7b2ac32420a7
io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_COOP_TASKRUN is used

If this is set, io_uring will never use an IPI to deliver a task_work
notification. This can be used in the common case where a single task or
thread communicates with the ring, and doesn't rely on
io_uring_cqe_peek().

This provides a noticeable win in performance, both from eliminating
the IPI itself, but also from avoiding interrupting the submitting
task unnecessarily.

Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20220426014904.60384-6-axboe@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h