]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: support CLOCK_BOOTTIME/REALTIME for timeouts
authorJens Axboe <axboe@kernel.dk>
Fri, 27 Aug 2021 23:11:06 +0000 (17:11 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 29 Aug 2021 13:57:23 +0000 (07:57 -0600)
commit457d3e89c413beb863db0c8db59ed044a3afaaac
tree66e2f1d3944cd9635942741a559d2c0deb049c69
parent8dcd68f4aee01ea74ffbca28e6d3cb512c2522ef
io_uring: support CLOCK_BOOTTIME/REALTIME for timeouts

Certain use cases want to use CLOCK_BOOTTIME or CLOCK_REALTIME rather than
CLOCK_MONOTONIC, instead of the default CLOCK_MONOTONIC.

Add an IORING_TIMEOUT_BOOTTIME and IORING_TIMEOUT_REALTIME flag that
allows timeouts and linked timeouts to use the selected clock source.

Only one clock source may be selected, and we -EINVAL the request if more
than one is given. If neither BOOTIME nor REALTIME are selected, the
previous default of MONOTONIC is used.

Link: https://github.com/axboe/liburing/issues/369
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h