summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2017-08-03 22:29:44 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-04 06:37:30 +0200
commitf214f915e7db99091f1312c48b30928c1e0c90b7 (patch)
tree2876e02b3a5623c305b63165fd9374526006cfb4 /tools
parentsock: ulimit on MSG_ZEROCOPY pages (diff)
downloadlinux-f214f915e7db99091f1312c48b30928c1e0c90b7.tar.xz
linux-f214f915e7db99091f1312c48b30928c1e0c90b7.zip
tcp: enable MSG_ZEROCOPY
Enable support for MSG_ZEROCOPY to the TCP stack. TSO and GSO are both supported. Only data sent to remote destinations is sent without copying. Packets looped onto a local destination have their payload copied to avoid unbounded latency. Tested: A 10x TCP_STREAM between two hosts showed a reduction in netserver process cycles by up to 70%, depending on packet size. Systemwide, savings are of course much less pronounced, at up to 20% best case. msg_zerocopy.sh 4 tcp: without zerocopy tx=121792 (7600 MB) txc=0 zc=n rx=60458 (7600 MB) with zerocopy tx=286257 (17863 MB) txc=286257 zc=y rx=140022 (17863 MB) This test opens a pair of sockets over veth, one one calls send with 64KB and optionally MSG_ZEROCOPY and on the other reads the initial bytes. The receiver truncates, so this is strictly an upper bound on what is achievable. It is more representative of sending data out of a physical NIC (when payload is not touched, either). Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions