liburing: send-zerocopy and linked timeout: how to deal buffer when timeout?
prepare to upgrade our diskless server to use send-zerocopy
send sqe linked with a timeout sqe to detect network problem, linked-timeout will return ETIME when something happen,
at this point, how to deal the buffer passed in by ...sendzc() ?
can it just be released as regular socket program? or is it still locked(maybe?) by somewhere in kernel stack ?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 34 (2 by maintainers)
Commits related to this issue
- io_uring/rw: fix short rw error handling We have a couple of problems, first reports of unexpected link breakage for reads when cqe->res indicates that the IO was done in full. The reason here is par... — committed to ammarfaizi2/linux-fork by isilence 4 years ago
- io_uring/rw: fix short rw error handling commit 4d9cb92ca4 upstream We have a couple of problems, first reports of unexpected link breakage for reads when cqe->res indicates that the IO was done in ... — committed to openvelinux/kernel by isilence 4 years ago
Never rely on a kernel version check. Either just try and the command and see if it fails, or use io_uring_get_probe() and check if that opcode is marked as supported.
yes, very glad of this.
cqe.res stores the numbers of bytes we’re currently trying to do, so how about this?
I also pushed to a branch with an explanation for convenience.
https://github.com/isilence/linux/commit/9a70c235e440f48b10a8903ef95d2c9bbd7ff0b3
edit: branch https://github.com/isilence/linux.git rw-link-break
Thanks, I’ve updated the commit and also included a link to this issue.
changed to
io_uring_get_probe()to check sendzc support, thanks to Jens will testing new api with 6.0-rc4 this week, and will check is there any performance lost with linked-timeout.–
for the abnormal
ECANCELED, uploaded the testing program.this happened when submit 2 SQEs (read/send) or 3 SQEs(read/send/timeout). output of testing server:
in server.c,
sending_timeoutset to 1 to include timeout, 0 excluded. tested on 5.19.5.issue-643-v1.zip