Skip to content

rtio: Chained timeouts #76970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
teburd opened this issue Aug 12, 2024 · 0 comments
Open

rtio: Chained timeouts #76970

teburd opened this issue Aug 12, 2024 · 0 comments
Assignees
Labels
area: RTIO Enhancement Changes/Updates/Additions to existing features

Comments

@teburd
Copy link
Collaborator

teburd commented Aug 12, 2024

Is your enhancement proposal related to a problem? Please describe.
Provide timeouts for RTIO, which would enable timeouts to be used across any RTIO capable device in a generic way.

Describe the solution you'd like
Using the same ideas io_uring has for linked timeouts is likely the best route. The idea being you setup a timeout operation that then links/chains into the operations you like to timeout on. The entire chain must complete before the timeout fires otherwise the remaining operations would be cancelled with -ETIMEOUT as an error code.

See IORING_OP_LINK_TIMEOUT with a prep function documented here https://man7.org/linux/man-pages/man3/io_uring_prep_link_timeout.3.html

Describe alternatives you've considered
io_uring offers other timeout operations that track, for the rings setup, the total number of completions to timeout on. E.g. you submit N submissions, and have a timeout setup to wait for N completions with T time.

This is actually more complex than the linked timeout in my opinion, and doesn't necessarily match up as well with how we'd expect to program typical I/O operation chains and timeouts.

Additional context
Timeouts are widely useful and are a desired feature of Bus and Sensor I/O operations

#27715 #33230 and many more

@teburd teburd added Enhancement Changes/Updates/Additions to existing features area: RTIO labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RTIO Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

1 participant