962 karma · joined September 6, 2013
- https://unixism.net - https://twitter.com/shuveb
https://unixism.net/loti/tutorial/sq_poll.html
Could be a good idea to use BPF to expose what io_uring is doing. Just a wild thought.
One place where a slightly high-level interface is provided by liburing is in the function io_uring_submit(). It determines among other things if there is a need to call the io_uring_enter() system call depending on whether you are in polling mode or not, for example. You can read more about it here:
https://unixism.net/loti/tutorial/sq_poll.html
Otherwise, at least at this time, liburing is a simple wrapper.
> I'm also actually not sure if in the uring version requests are guaranteed to be processed in order or not. I would have assumed the latter - and thereby the printed result could have been out of order.
io_uring may not make completions available in the same order as submissions. The article goes into some detail explaining this. However, the "cat" example only deals with one request at a time which uses readv() and readv()'s iovecs are returned in order. So, this is not a problem. The "cp" example does deal with multiple submissions and completions, however it uses writev() on the completion of each readv(), writing the correct offsets. So, it wouldn't matter if completions arrive out of order. But this is indeed something to look out for.
I'm sure someone is already working on integrating information made available in PSI to Kubernetes so that the automation bit is taken care of.
https://man.openbsd.org/FreeBSD-11.1/sendfile.2 https://linux.die.net/man/2/sendfile