]> git.baikalelectronics.ru Git - kernel.git/commit
net: skb_segment() should preserve backpressure
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Mon, 27 Oct 2014 17:30:51 +0000 (10:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Oct 2014 18:47:19 +0000 (14:47 -0400)
commitac9d8f03b17de0fc6752ba78f65ef95bfef99f6f
tree9aa224539b3cd74aaed24a8a4195e9f5bc6fef61
parent08106a6fef543d3f7f41e7089815a15987fcfd49
net: skb_segment() should preserve backpressure

This patch generalizes commit 4506b471c706 ("tcp: GSO should be TSQ
friendly") to protocols using skb_set_owner_w()

TCP uses its own destructor (tcp_wfree) and needs a more complex scheme
as explained in commit a1c914392b65 ("tcp: gso: do not generate out of
order packets")

This allows UDP sockets using UFO to get proper backpressure,
thus avoiding qdisc drops and excessive cpu usage.

Here are performance test results (macvlan on vlan):

- Before
# netperf -t UDP_STREAM ...
Socket  Message  Elapsed      Messages
Size    Size     Time         Okay Errors   Throughput
bytes   bytes    secs            #      #   10^6bits/sec

212992   65507   60.00      144096 1224195    1258.56
212992           60.00          51              0.45

Average:        CPU     %user     %nice   %system   %iowait    %steal     %idle
Average:        all      0.23      0.00     25.26      0.08      0.00     74.43

- After
# netperf -t UDP_STREAM ...
Socket  Message  Elapsed      Messages
Size    Size     Time         Okay Errors   Throughput
bytes   bytes    secs            #      #   10^6bits/sec

212992   65507   60.00      109593      0     957.20
212992           60.00      109593            957.20

Average:        CPU     %user     %nice   %system   %iowait    %steal     %idle
Average:        all      0.18      0.00      8.38      0.02      0.00     91.43

[edumazet] Rewrote patch and changelog.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c