6

I saw this article:

http://lwn.net/2001/0419/kernel.php3

Zero-copy networking will be in 2.4.4. This patch, by David Miller, Alexey Kuznetsov, and others, has been in development and testing for some time, and was incorporated into the "ac" kernel series back in 2.4.2ac4. In a way, it is a surprising change to see in a stable kernel series, since it makes fundamental changes deep in the networking code. From all reports, however, it is solid, and, in certain situations, it should produce significant performance benefits.

Can someone tell me if zero-copy networking exists by default in Linux, or whether this patch was just to allow people who wanted to do zero-copy networking to be able to implement it?

In other words, in the current Ubuntu does it perform zero-copy networking all the time or would I have to use certain system calls to utilise the above patch?

  • According to how I understand the article it will always perform zero-copy networking as long as the driver of your network card supports it. If not, it won't, but there is no way how you could dynamically enable/disable it. – replay Aug 20 '13 at 13:31
2

In Linux' kernel git repo:

git log --oneline -- drivers/net | head -n5000 | egrep -i 'zero[[:space:]]*copy'

tells us:

  • 7d9e6dd macvtap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS
  • 05464d2 tuntap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS
  • bd31fdd macvtap: correctly linearize skb when zerocopy is used
  • d09ec76 tuntap: correctly linearize skb when zerocopy is used
  • 19a6afb tuntap: set SOCK_ZEROCOPY flag during open
  • 149d36f tun: report orphan frags errors to zero copy callback

which (I believe) answers your question clearly and positive. ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.