]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: coalesce rx frags when possible during rx
authorJason Wang <jasowang@redhat.com>
Fri, 1 Nov 2013 06:07:48 +0000 (14:07 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Nov 2013 01:03:52 +0000 (20:03 -0500)
commit931b92cc96a80c95fdf5762246926eaadee670a0
tree2b838baaa714e9d1a027fe6f199bf4b06b118044
parent43a8d54454148f968133539774c508957e89513a
virtio-net: coalesce rx frags when possible during rx

Commit de4826a7cfe2984a8c3420d219973d2249baf9de (virtio_net: migrate mergeable
rx buffers to page frag allocators) try to increase the payload/truesize for
MTU-sized traffic. But this will introduce the extra overhead for GSO packets
received because of the frag list. This commit tries to reduce this issue by
coalesce the possible rx frags when possible during rx. Test result shows the
about 15% improvement on full size GSO packet receiving (and even better than
before commit de4826a7cfe2984a8c3420d219973d2249baf9de).

Before this commit:
./netperf -H 192.168.100.4
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.100.4
() port 0 AF_INET : demo
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.00    20303.87

After this commit:
./netperf -H 192.168.100.4
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.100.4
() port 0 AF_INET : demo
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.00    23841.26

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Michael Dalton <mwdalton@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c