linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next RFC v3 0/7] Improve GbEth performance on Renesas RZ/G2L and related SoCs
@ 2024-04-15  9:47 Paul Barker
  2024-04-15  9:47 ` [net-next RFC v3 1/7] net: ravb: Simplify poll & receive functions Paul Barker
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Paul Barker @ 2024-04-15  9:47 UTC (permalink / raw)
  To: Sergey Shtylyov, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Paul Barker, Niklas Söderlund, Geert Uytterhoeven, netdev,
	linux-renesas-soc, linux-kernel

This series aims to improve performance of the GbEth IP in the Renesas
RZ/G2L SoC family and the RZ/G3S SoC, which use the ravb driver. Along
the way, we do some refactoring and ensure that napi_complete_done() is
used in accordance with the NAPI documentation for both GbEth and R-Car
code paths.

Much of the performance improvement comes from enabling SW IRQ
Coalescing for all SoCs using the GbEth IP, and NAPI Threaded mode for
single core SoCs using the GbEth IP. These can be enabled/disabled at
runtime via sysfs, but our goal is to set sensible defaults which get
good performance on the affected SoCs.

The rest of the performance improvement comes from using a page pool to
allocate RX buffers, and reducing the allocation size from >8kB to 2kB.

The overall performance impact of this patch series seen in testing with
iperf3 is as follows (see patches 5-7 for more detailed results):
  * RZ/G2L:
    * TCP TX: +1.8% bandwidth
    * TCP RX: +1% bandwidth at 47% less CPU load
    * UDP RX: +1% bandwidth at 26% less CPU load

  * RZ/G2UL:
    * TCP TX: +37% bandwidth
    * TCP RX: +43% bandwidth
    * UDP TX: -8% bandwidth
    * UDP RX: +32500% bandwidth (!)

  * RZ/G3S:
    * TCP TX: +25% bandwidth
    * TCP RX: +76% bandwidth
    * UDP TX: -9% bandwidth
    * UDP RX: +37900% bandwidth (!)

  * RZ/Five:
    * TCP TX: +18% bandwidth
    * TCP RX: +212% bandwidth
    * UDP TX: +2% bandwidth
    * UDP RX: +inf bandwidth (test no longer crashes)

There is no significant impact on bandwidth or CPU load in testing on
RZ/G2H or R-Car M3N.

Fixing the crash in UDP RX testing for RZ/Five is a cumulative effect of
patches 1, 2, 5 & 6 so this is very difficult to break out as a bugfix
for backporting.

This series depends on my recent ravb bugfix patches [1] which are not
yet merged.

[1]: https://lore.kernel.org/all/20240412100024.2296-1-paul.barker.ct@bp.renesas.com/

Changes v2->v3:
  * Incorporated feedback on RFC v2 from Sergey.
  * Split out bugfixes and rebased. This changed the order of what was
    the first 5 patches of v2 and things look a little different so I've
    not picked up Reviewed-by tags from v2.
  * Further refactoring and tidy up of RX ring refill and
    ravb_rx_gbeth().
  * Switched to using a page pool to allocate RX buffers.
  * Re-tested and provided updated performance figures.

Changes v1->v2:
  * Marked as RFC as the series depends on unmerged patches.
  * Refactored R-Car code paths as well as GbEth code paths.
  * Updated references to the patches this series depends on.

Paul Barker (7):
  net: ravb: Simplify poll & receive functions
  net: ravb: Align poll function with NAPI docs
  net: ravb: Refactor RX ring refill
  net: ravb: Refactor GbEth RX code path
  net: ravb: Enable SW IRQ Coalescing for GbEth
  net: ravb: Use NAPI threaded mode on 1-core CPUs with GbEth IP
  net: ravb: Allocate RX buffers via page pool

 drivers/net/ethernet/renesas/ravb.h      |  13 +-
 drivers/net/ethernet/renesas/ravb_main.c | 430 +++++++++++------------
 2 files changed, 221 insertions(+), 222 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2024-04-21 20:23 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15  9:47 [net-next RFC v3 0/7] Improve GbEth performance on Renesas RZ/G2L and related SoCs Paul Barker
2024-04-15  9:47 ` [net-next RFC v3 1/7] net: ravb: Simplify poll & receive functions Paul Barker
2024-04-15 11:23   ` Niklas Söderlund
2024-04-15 11:31     ` Paul Barker
2024-04-15  9:47 ` [net-next RFC v3 2/7] net: ravb: Align poll function with NAPI docs Paul Barker
2024-04-15 11:44   ` Niklas Söderlund
2024-04-15 12:08     ` Paul Barker
2024-04-15  9:48 ` [net-next RFC v3 3/7] net: ravb: Refactor RX ring refill Paul Barker
2024-04-15 11:57   ` Niklas Söderlund
2024-04-15 12:18     ` Paul Barker
2024-04-15 12:30       ` Niklas Söderlund
2024-04-15  9:48 ` [net-next RFC v3 4/7] net: ravb: Refactor GbEth RX code path Paul Barker
2024-04-19 20:03   ` Sergey Shtylyov
2024-04-21 15:49     ` Paul Barker
2024-04-21 20:23       ` Sergey Shtylyov
2024-04-15  9:48 ` [net-next RFC v3 5/7] net: ravb: Enable SW IRQ Coalescing for GbEth Paul Barker
2024-04-19 20:26   ` Sergey Shtylyov
2024-04-15  9:48 ` [net-next RFC v3 6/7] net: ravb: Use NAPI threaded mode on 1-core CPUs with GbEth IP Paul Barker
2024-04-19 20:32   ` Sergey Shtylyov
2024-04-15  9:48 ` [net-next RFC v3 7/7] net: ravb: Allocate RX buffers via page pool Paul Barker
2024-04-15 12:16   ` Niklas Söderlund
2024-04-19  8:02     ` Paul Barker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).