OSDN Git Service

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>
Sat, 30 Apr 2022 14:39:54 +0000 (08:39 -0600)
commite1169f06d5bbdbc2b22ae4e3083a4bf75ae5ecee
tree97d2af2ef27fd8f46011b3330cc7d859b469f09a
parent9f010507bbc1be19dbeedc1a254209fea44adc14
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