]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
s390/qeth: fix GSO throughput regression
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Fri, 1 Dec 2017 09:14:50 +0000 (10:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 02:35:21 +0000 (21:35 -0500)
commit6d69b1f1eb7a2edf8a3547f361c61f2538e054bb
tree11944d807ae8a95faa6a3f77491a52cbe0bd1378
parentbc3ab70584696cb798b9e1e0ac8e6ced5fd4c3b8
s390/qeth: fix GSO throughput regression

Using GSO with small MTUs currently results in a substantial throughput
regression - which is caused by how qeth needs to map non-linear skbs
into its IO buffer elements:
compared to a linear skb, each GSO-segmented skb effectively consumes
twice as many buffer elements (ie two instead of one) due to the
additional header-only part. This causes the Output Queue to be
congested with low-utilized IO buffers.

Fix this as follows:
If the MSS is low enough so that a non-SG GSO segmentation produces
order-0 skbs (currently ~3500 byte), opt out from NETIF_F_SG. This is
where we anticipate the biggest savings, since an SG-enabled
GSO segmentation produces skbs that always consume at least two
buffer elements.

Larger MSS values continue to get a SG-enabled GSO segmentation, since
1) the relative overhead of the additional header-only buffer element
becomes less noticeable, and
2) the linearization overhead increases.

With the throughput regression fixed, re-enable NETIF_F_SG by default to
reap the significant CPU savings of GSO.

Fixes: 5722963a8e83 ("qeth: do not turn on SG per default")
Reported-by: Nils Hoppmann <niho@de.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c