All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.19 0/2] Backport fixes for 3226b158e67c
@ 2021-07-29 18:44 Matthieu Baerts
  2021-07-29 18:44 ` [PATCH 4.19 1/2] virtio_net: Do not pull payload in skb->head Matthieu Baerts
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matthieu Baerts @ 2021-07-29 18:44 UTC (permalink / raw)
  To: stable; +Cc: Eric Dumazet, Matthieu Baerts

Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs")
introduces a ~10% performance drop when using virtio-net drivers.

This commit has been backported to v4.19 in commit 669c0b5782fb and this
performance drop is also visible there.
Here at Tessares, we can also notice this drop with the MPTCP fork [1]
on top of the v4.19 kernel.

Eric Dumazet already fixed this issue a few months ago, see
commit 0f6925b3e8da ("virtio_net: Do not pull payload in skb->head").

Unfortunately, this patch has not been backported to < v5.4 because it
caused issues [2]. Indeed, after having backported it, the kernel failed
to compile because one commit was missing, see
commit 503d539a6e41 ("virtio_net: Add XDP meta data support"). However,
this missing commit has been added in 4.19.186 but probably because
there were still some opened discussions [3] around
commit 0f6925b3e8da ("virtio_net: Do not pull payload in skb->head"),
the latter has not been backported at all in v4.19.

A cherry-pick of this patch without any modification is proposed here.
It has been validated: it fixes the original issue on v4.19 as well.

Please note that there is also a fix for the fix, see
commit 38ec4944b593 ("gro: ensure frag0 meets IP header alignment").

This second fix has also not been backported because it caused issues as
well [4]. Here, it was due to a conflict but also a compilation error
when the conflict has been resolved. Please refer to patch 2/2 for more
details.

One last note: these two patches have also been backported and validated
on a v4.14 release. A second series is going to be sent.
It looks like it could be interesting to backport these two patches to
v4.9 and v4.4 as well but unfortunately, the backport of these two
patches fails with conflicts and I don't have any setup to validate the
performance drop and fix with v4.9 and v4.4 kernels.

[1] https://github.com/multipath-tcp/mptcp
[2] https://lore.kernel.org/stable/161806389686151@kroah.com/
[3] https://lore.kernel.org/stable/20210412051204-mutt-send-email-mst@kernel.org/
[4] https://lore.kernel.org/stable/1618749018155126@kroah.com/

Eric Dumazet (2):
  virtio_net: Do not pull payload in skb->head
  gro: ensure frag0 meets IP header alignment

 drivers/net/virtio_net.c   | 10 +++++++---
 include/linux/skbuff.h     |  9 +++++++++
 include/linux/virtio_net.h | 14 +++++++++-----
 net/core/dev.c             |  3 ++-
 4 files changed, 27 insertions(+), 9 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-30 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 18:44 [PATCH 4.19 0/2] Backport fixes for 3226b158e67c Matthieu Baerts
2021-07-29 18:44 ` [PATCH 4.19 1/2] virtio_net: Do not pull payload in skb->head Matthieu Baerts
2021-07-29 18:44 ` [PATCH 4.19 2/2] gro: ensure frag0 meets IP header alignment Matthieu Baerts
2021-07-30 10:45 ` [PATCH 4.19 0/2] Backport fixes for 3226b158e67c Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.