Skip to content
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

IORING_OP_TIMEOUT / IORING_OP_TIMEOUT_REMOVE. Consider allowing a single int64 as a timeout. #1118

Open
vsolontsov-ll opened this issue Apr 4, 2024 · 0 comments

Comments

@vsolontsov-ll
Copy link

I'm not sure if it's worth the efforts. However it looks a bit quirky that one needs to keep a struct __kernel_timespec alive until the submission is fully done.

I feel it would be nice to have a flag like IORING_TIMEOUT_PURE_NS, and encode its value in the addr field.

An alternative could be normalizing the timespec so that the tv_nsec is less than 999'999'999. We could take it to some i32 field in the sqe. I don't see any use of fields from the union with splice_fd_in for TIMEOUTs...

BTW, unlike timerfd_settime(), the uring implementation is currently not strict and doesn't reject if tv_nsec > 999'999'999. Could it be documented, or you need a freedom to make it stricter in the future?

@vsolontsov-ll vsolontsov-ll changed the title IORING_OP_TIMEOUT / IORING_OP_TIMEOUT_REMOVE. Consider allowing a single int64 asa timeout. IORING_OP_TIMEOUT / IORING_OP_TIMEOUT_REMOVE. Consider allowing a single int64 a sa timeout. Apr 4, 2024
@vsolontsov-ll vsolontsov-ll changed the title IORING_OP_TIMEOUT / IORING_OP_TIMEOUT_REMOVE. Consider allowing a single int64 a sa timeout. IORING_OP_TIMEOUT / IORING_OP_TIMEOUT_REMOVE. Consider allowing a single int64 as a timeout. Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant