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>
Fri, 1 Nov 2024 14:26:58 +0000 (08:26 -0600)
commit71b51c2fb200c502626e433ac7e22bcb8a3ae00c
treee52bb02ab30f3e74edd17d552cc882d28d2d7a3c
parentb0317560b25cd73f5b2ec80047bd3a974fcecfa6
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