Zero-copy network transmission with io_uring
Zero-copy network transmission with io_uring
Posted Jan 4, 2022 11:19 UTC (Tue) by farnz (subscriber, #17727)In reply to: Zero-copy network transmission with io_uring by NYKevin
Parent article: Zero-copy network transmission with io_uring
Getting to 4 is, however, useful in terms of RAII or other stack-based buffer management. Until you get to 4, the kernel may need access to the data again so that it can resend if not ACKed; once you get to 4, the kernel will never look at the buffer again, even if the remote application doesn't receive the data.
Basically, getting to 1 is the minimum useful state, but it makes zero-copy hard, because I now have to keep the buffer alive in user-space until the kernel gets to 4. Getting to 4 or clearly indicating that we will never get to 4 is useful because it means that when send returns, the kernel is promising to never look at the buffer again.
