Comments (4)
The man page is wrong. What the flag means is that dependent links for this SQE will not get failed in case of -ETIME, the request itself will still be posting -ETIME as the result code.
from liburing.
The man page is wrong, it's supposed to return -ETIME even with IORING_TIMEOUT_ETIME_SUCCESS
.
The flag has never been changing the return code, the only effect is that it doesn't break links. E.g.
sqe = io_uring_get_sqe();
prep_timeout(sqe, flags = 0);
sqe->flags |= IOSQE_LINK;
sqe = io_uring_get_sqe();
prep_read(sqe);
Here the read would never be executed, you'd usually get something like cqe1.res = -ETIME, cqe2.res = -ECANCELED.
If you pass IORING_TIMEOUT_ETIME_SUCCESS
, however, you would expect the read to be actually run.
from liburing.
The man page is wrong, it's supposed to return -ETIME even with
IORING_TIMEOUT_ETIME_SUCCESS
. The flag has never been changing the return code, the only effect is that it doesn't break links. E.g.sqe = io_uring_get_sqe(); prep_timeout(sqe, flags = 0); sqe->flags |= IOSQE_LINK; sqe = io_uring_get_sqe(); prep_read(sqe);
Here the read would never be executed, you'd usually get something like cqe1.res = -ETIME, cqe2.res = -ECANCELED. If you pass
IORING_TIMEOUT_ETIME_SUCCESS
, however, you would expect the read to be actually run.
Using io_uring_prep_link_timeout to Control Dependent Task Timeout vs. prep_timeout -> (linked) -> read op
What's the difference between using io_uring_prep_link_timeout to control the timeout of a dependent task and using prep_timeout -> (linked) -> read op?
I found that io_uring_prep_link_timeout is not always able to cancel the dependent task.
from liburing.
Here the read would never be executed, you'd usually get something like cqe1.res = -ETIME, cqe2.res = -ECANCELED. If you pass
IORING_TIMEOUT_ETIME_SUCCESS
, however, you would expect the read to be actually run.Using io_uring_prep_link_timeout to Control Dependent Task Timeout vs. prep_timeout -> (linked) -> read op
What do you mean by "Control Dependent Task Timeout"? I can assume "Dependent Task" is a linked request, but even then I don't understand what it means.
What's the difference between using io_uring_prep_link_timeout to control the timeout of a dependent task and using prep_timeout -> (linked) -> read op?
I found that io_uring_prep_link_timeout is not always able to cancel the dependent task.
The only situation it can legally happen is if the timeout fired when the request it's linked to has already been completed but not yet removed. Something like this:
CPU1 | CPU2
execute_request(); |
complete_request() |
post_cqe(); |
| linked timeout triggered
cancel_timeout() |
And it's perfectly ok. Apps can think as if the request got completed before timeout. If you see any other cases, let us know.
from liburing.
Related Issues (20)
- redefinition of 'struct in6_pktinfo' when building on ubi7 with gcc/g++ 9.5.0 HOT 5
- Can we know how many bytes we have read by using io_uring_prep_readv method? HOT 1
- RCU calls made by the NAPI busy poll code generates context switches occupying 50% of the time of the CPU hosting the sqp thread HOT 92
- Per-iovec zero-copy and fixed buffer settings for writev/sendmsg HOT 5
- possible socket leakage with direct file descriptors HOT 21
- Ordering guarantees between accept and close? HOT 11
- SYSCHK(syscall(__NR_io_uring_setup, 10, ¶ms)): Invalid argument HOT 3
- io_uring openat non-existing file, cqe->res returns -2, outside of specification HOT 2
- io_uring_prep_recv with IORING_RECVSEND_BUNDLE always fills only one buffer at a time HOT 13
- io_uring_prep_send_bundle should not have len argument HOT 5
- Wrong number of arguments in io_uring_prep_fixed_fd_install man
- test buf-ring-nommap.t failed with -12 (-ENOMEM) in ppc64le arch.
- Long tail between submit event to complete event exceed 1 second
- io_poll and sqpoll cause IOPS degradation
- ppc64le: Tests failed (2): <no-mmap-inval.t> <reg-fd-only.t> HOT 4
- ` io_uring_prep_link_timeout` may return undocumented error -ENOENT HOT 3
- Behavior of io_uring_wait_cqes is not documented for null `ts` HOT 1
- `io_uring_prep_link_timeout` return -EINVAL with valid timespec and flag HOT 5
- `io_uring_prep_timeout` never fires HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liburing.