alistair23-linux/net
Herbert Xu 69d1506731 [TCP]: Let skbs grow over a page on fast peers
While testing the virtio-net driver on KVM with TSO I noticed
that TSO performance with a 1500 MTU is significantly worse
compared to the performance of non-TSO with a 16436 MTU.  The
packet dump shows that most of the packets sent are smaller
than a page.

Looking at the code this actually is quite obvious as it always
stop extending the packet if it's the first packet yet to be
sent and if it's larger than the MSS.  Since each extension is
bound by the page size, this means that (given a 1500 MTU) we're
very unlikely to construct packets greater than a page, provided
that the receiver and the path is fast enough so that packets can
always be sent immediately.

The fix is also quite obvious.  The push calls inside the loop
is just an optimisation so that we don't end up doing all the
sending at the end of the loop.  Therefore there is no specific
reason why it has to do so at MSS boundaries.  For TSO, the
most natural extension of this optimisation is to do the pushing
once the skb exceeds the TSO size goal.

This is what the patch does and testing with KVM shows that the
TSO performance with a 1500 MTU easily surpasses that of a 16436
MTU and indeed the packet sizes sent are generally larger than
16436.

I don't see any obvious downsides for slower peers or connections,
but it would be prudent to test this extensively to ensure that
those cases don't regress.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-22 15:47:05 -07:00
..
9p net/9p/trans_virtio.c: kmalloc() enough memory 2008-02-19 16:25:30 -08:00
802 [TR] net/802/tr.c: sysctl_tr_rif_timeout static 2008-01-31 19:28:31 -08:00
8021q [8021Q]: vlan_dev misannotations 2008-03-17 22:49:48 -07:00
appletalk [APPLETALK]: Use proc_create() to setup ->proc_fops first 2008-02-28 12:53:32 -08:00
atm [ATM]: Use proc_create() to setup ->proc_fops first 2008-02-28 13:55:45 -08:00
ax25 [AX25] ax25_out: check skb for NULL in ax25_kick() 2008-02-17 22:31:19 -08:00
bluetooth bluetooth: make bnep_sock_cleanup() return void 2008-03-05 18:47:40 -08:00
bridge bridge: use time_before() in br_fdb_cleanup() 2008-03-20 15:54:58 -07:00
can [CAN]: Minor clean-ups 2008-02-07 18:05:04 -08:00
core netpoll: zap_completion_queue: adjust skb->users counter 2008-03-20 16:07:27 -07:00
dccp [SOCK] proto: Add hashinfo member to struct proto 2008-02-03 04:28:52 -08:00
decnet [DECNET] ROUTE: remove unecessary alignment 2008-02-07 23:29:57 -08:00
econet [NET]: Convert init_timer into setup_timer 2008-01-28 14:53:35 -08:00
ethernet [ETH]: Combine format_addr() with print_mac(). 2008-01-28 15:00:05 -08:00
ieee80211 ieee80211: beacon->capability is little-endian 2008-01-28 15:08:48 -08:00
ipv4 [TCP]: Let skbs grow over a page on fast peers 2008-03-22 15:47:05 -07:00
ipv6 [IPV6] KCONFIG: Fix description about IPV6_TUNNEL. 2008-03-20 16:13:58 -07:00
ipx [IPX]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:06:14 -08:00
irda [IRDA]: Use proc_create() to setup ->proc_fops first 2008-02-29 10:34:45 -08:00
iucv iucv: fix build error on !SMP 2008-03-03 12:12:33 -08:00
key [AF_KEY]: Fix oops by converting to proc_net_*(). 2008-02-26 22:23:31 -08:00
lapb [LAPB] net/lapb/lapb_iface.c: use LIST_HEAD instead of LIST_HEAD_INIT 2008-01-28 14:56:52 -08:00
llc [LLC]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:08:54 -08:00
mac80211 rc80211-pid: fix rate adjustment 2008-03-04 18:36:35 -05:00
netfilter [NETFILTER]: nf_conntrack_h323: logical-bitwise & confusion in process_setup() 2008-03-20 15:06:23 -07:00
netlabel [NETLABEL]: Move some initialization code into __init section. 2008-02-17 22:33:57 -08:00
netlink [GENETLINK]: Relax dances with genl_lock. 2008-02-12 22:16:33 -08:00
netrom [NET]: Simple ctl_table to ctl_path conversions. 2008-01-28 15:01:07 -08:00
packet [PACKET]: Fix sparse warnings in af_packet.c 2008-01-28 15:00:48 -08:00
rfkill PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
rose [ROSE]: Supress sparse warnings 2008-01-28 15:02:44 -08:00
rxrpc RxRPC: fix rxrpc_recvmsg()'s returning of msg_name 2008-03-05 18:53:55 -08:00
sched [PKT_SCHED]: annotate cls_u32 2008-03-17 22:46:46 -07:00
sctp [SCTP]: Fix a race between module load and protosw access 2008-03-20 15:17:14 -07:00
sunrpc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-03-17 23:44:31 -07:00
tipc tipc: fix integer as NULL pointer sparse warnings in tipc 2008-02-24 18:38:31 -08:00
unix Introduce path_put() 2008-02-14 21:13:33 -08:00
wanrouter [WANROUTER]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:15:56 -08:00
wireless WEXT: remove unused variable 2008-01-28 15:10:48 -08:00
x25 [X25]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:16:33 -08:00
xfrm [XFRM]: Fix ordering issue in xfrm_dst_hash_transfer(). 2008-02-17 23:29:30 -08:00
compat.c [NETFILTER]: ip6_tables: add compat support 2008-01-28 14:58:36 -08:00
Kconfig namespaces: mark NET_NS with "depends on NAMESPACES" 2008-02-08 09:22:23 -08:00
Makefile [CAN]: Add PF_CAN core module 2008-01-28 14:54:10 -08:00
nonet.c
socket.c [DLCI]: Fix tiny race between module unload and sock_ioctl. 2008-03-21 15:58:52 -07:00
sysctl_net.c [NET]: Remove the empty net_table 2008-01-28 14:56:29 -08:00
TUNABLE