]> git.baikalelectronics.ru Git - kernel.git/commit
net: use indirect call wrappers for skb_copy_datagram_iter()
authorEric Dumazet <edumazet@google.com>
Wed, 25 Mar 2020 02:23:21 +0000 (19:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Mar 2020 18:30:40 +0000 (11:30 -0700)
commit7e1d9c389dfe36602975eb537d537e95f38871fc
tree54aab071a4a33ef17587a53e3e9409ae249d6629
parent1b53ea30d242a6a9cb9d032530fd2f829d314cbf
net: use indirect call wrappers for skb_copy_datagram_iter()

TCP recvmsg() calls skb_copy_datagram_iter(), which
calls an indirect function (cb pointing to simple_copy_to_iter())
for every MSS (fragment) present in the skb.

CONFIG_RETPOLINE=y forces a very expensive operation
that we can avoid thanks to indirect call wrappers.

This patch gives a 13% increase of performance on
a single flow, if the bottleneck is the thread reading
the TCP socket.

Fixes: 8dc3f0dbe4ca ("datagram: consolidate datagram copy to iter helpers")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/datagram.c