diff options
author | Willy Tarreau <w@1wt.eu> | 2012-12-02 12:49:27 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-03 02:23:01 +0100 |
commit | 02275a2ee7c0ea475b6f4a6428f5df592bc9d30b (patch) | |
tree | 820c92949d326bcf394eca339453a0389a998300 /net/caif | |
parent | net: fix sparse endianness warnings on sock_common (diff) | |
download | linux-02275a2ee7c0ea475b6f4a6428f5df592bc9d30b.tar.xz linux-02275a2ee7c0ea475b6f4a6428f5df592bc9d30b.zip |
tcp: don't abort splice() after small transfers
TCP coalescing added a regression in splice(socket->pipe) performance,
for some workloads because of the way tcp_read_sock() is implemented.
The reason for this is the break when (offset + 1 != skb->len).
As we released the socket lock, this condition is possible if TCP stack
added a fragment to the skb, which can happen with TCP coalescing.
So let's go back to the beginning of the loop when this happens,
to give a chance to splice more frags per system call.
Doing so fixes the issue and makes GRO 10% faster than LRO
on CPU-bound splice() workloads instead of the opposite.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
0 files changed, 0 insertions, 0 deletions