io_uring: add support for multishot timeouts
authorDavid Wei <davidhwei@meta.com>
Tue, 18 Apr 2023 22:58:18 +0000 (15:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Apr 2023 01:38:36 +0000 (19:38 -0600)
commitea97f6c8558e83cb457c3b5f53351e4fd8519ab1
treee294b2a17ce99a18af919302ea590eb91e01c24d
parent2236b3905b4d4e9cd4d149ab35767858c02bb79b
io_uring: add support for multishot timeouts

A multishot timeout submission will repeatedly generate completions with
the IORING_CQE_F_MORE cflag set. Depending on the value of the `off'
field in the submission, these timeouts can either repeat indefinitely
until cancelled (`off' = 0) or for a fixed number of times (`off' > 0).

Only noseq timeouts (i.e. not dependent on the number of I/O
completions) are supported.

An indefinite timer will be cancelled if the CQ ever overflows.

Signed-off-by: David Wei <davidhwei@meta.com>
Link: https://lore.kernel.org/r/20230418225817.1905027-1-davidhwei@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h
io_uring/timeout.c