io_uring: add support for hybrid IOPOLL
authorhexue <xue01.he@samsung.com>
Fri, 1 Nov 2024 09:19:57 +0000 (17:19 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 2 Nov 2024 21:45:30 +0000 (15:45 -0600)
commit01ee194d1aba1202f0926d5047a2a4cf84d0e45d
tree48d0abfa4cbf2efc5f69ac5c85817ee9ef25f570
parentc1329532d5aabecf79788924941afb8a7b7c1024
io_uring: add support for hybrid IOPOLL

A new hybrid poll is implemented on the io_uring layer. Once an IO is
issued, it will not poll immediately, but rather block first and re-run
before IO complete, then poll to reap IO. While this poll method could
be a suboptimal solution when running on a single thread, it offers
performance lower than regular polling but higher than IRQ, and CPU
utilization is also lower than polling.

To use hybrid polling, the ring must be setup with both the
IORING_SETUP_IOPOLL and IORING_SETUP_HYBRID)IOPOLL flags set. Hybrid
polling has the same restrictions as IOPOLL, in that commands must
explicitly support it.

Signed-off-by: hexue <xue01.he@samsung.com>
Link: https://lore.kernel.org/r/20241101091957.564220-2-xue01.he@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
include/uapi/linux/io_uring.h
io_uring/io_uring.c
io_uring/rw.c