tcp: optimise skb_zerocopy_iter_stream()
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 28 Apr 2022 10:57:46 +0000 (11:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 2 May 2022 21:36:24 +0000 (14:36 -0700)
commit829b7bdd70449c211eb6b2673fcbc597ce120939
treeb0f32cba453e0e9472cd6d0f76db77c6ef7c2bf2
parent0b9f1b265ee16cd991714fe310eb59b800c142c5
tcp: optimise skb_zerocopy_iter_stream()

It's expensive to make a copy of 40B struct iov_iter to the point it
was taking 0.2-0.5% of all cycles in my tests. iov_iter_revert() should
be fine as it's a simple case without nested reverts/truncates.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a7e1690c00c5dfe700c30eb9a8a81ec59f6545dd.1650884401.git.asml.silence@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/skbuff.c