From: Willy Tarreau Date: Sun, 2 Dec 2012 11:49:27 +0000 (+0000) Subject: tcp: don't abort splice() after small transfers X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~45^2~120 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02275a2ee7c0ea475b6f4a6428f5df592bc9d30b;p=pandora-kernel.git 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 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed