Message ID | 20240206091909.3191-8-paul.barker.ct@bp.renesas.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Improve GbEth performance on Renesas RZ/G2L and related SoCs | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/apply | fail | Patch does not apply to net-next |
On 2/6/24 12:19 PM, Paul Barker wrote: > NAPI Threaded mode (along with the previously enabled SW IRQ Coalescing) > is required to improve network stack performance for single core SoCs > using the GbEth IP (currently the RZ/G2L SoC family and the RZ/G3S SoC). > > For the RZ/G2UL, network throughput is greatly increased by this change > (results obtained with iperf3) for all test cases except UDP TX: > * TCP TX: 30% more throughput > * TCP RX: 9.8% more throughput > * UDP TX: 9.7% less throughput > * UDP RX: 89% more throughput > > For the RZ/G3S we see improvements in network throughput similar to the > RZ/G2UL. > > The improvement of UDP RX bandwidth for the single core SoCs (RZ/G2UL & > RZ/G3S) is particularly critical. NAPI Threaded mode can be disabled at > runtime via sysfs for applications where UDP TX performance is a > priority. > > Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> [...] MBR, Sergey
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 7bb80608f260..522df82524ff 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2984,8 +2984,11 @@ static int ravb_probe(struct platform_device *pdev) if (info->nc_queues) netif_napi_add(ndev, &priv->napi[RAVB_NC], ravb_poll); - if (info->needs_irq_coalesce) + if (info->needs_irq_coalesce) { netdev_sw_irq_coalesce_default_on(ndev); + if (num_present_cpus() == 1) + dev_set_threaded(ndev, true); + } /* Network device register */ error = register_netdev(ndev);
NAPI Threaded mode (along with the previously enabled SW IRQ Coalescing) is required to improve network stack performance for single core SoCs using the GbEth IP (currently the RZ/G2L SoC family and the RZ/G3S SoC). For the RZ/G2UL, network throughput is greatly increased by this change (results obtained with iperf3) for all test cases except UDP TX: * TCP TX: 30% more throughput * TCP RX: 9.8% more throughput * UDP TX: 9.7% less throughput * UDP RX: 89% more throughput For the RZ/G3S we see improvements in network throughput similar to the RZ/G2UL. The improvement of UDP RX bandwidth for the single core SoCs (RZ/G2UL & RZ/G3S) is particularly critical. NAPI Threaded mode can be disabled at runtime via sysfs for applications where UDP TX performance is a priority. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> --- drivers/net/ethernet/renesas/ravb_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)