mbox series

[net-next,v4,0/4] net: stmmac: improve tx timer logic

Message ID 20231018123550.27110-1-ansuelsmth@gmail.com (mailing list archive)
Headers show
Series net: stmmac: improve tx timer logic | expand

Message

Christian Marangi Oct. 18, 2023, 12:35 p.m. UTC
This series comes with the intention of restoring original performance
of stmmac on some router/device that used the stmmac driver to handle
gigabit traffic.

More info are present in patch 3. This cover letter is to show results
and improvements of the following change.

The move to hr_timer for tx timer and commit 8fce33317023 ("net: stmmac:
Rework coalesce timer and fix multi-queue races") caused big performance
regression on these kind of device.

This was observed on ipq806x that after kernel 4.19 couldn't handle
gigabit speed anymore.

The following series is currently applied and tested in OpenWrt SNAPSHOT
and have great performance increase. (the scenario is qca8k switch +
stmmac dwmac1000) Some good comparison can be found here [1].

The difference is from a swconfig scenario (where dsa tagging is not
used so very low CPU impact in handling traffic) and DSA scenario where
tagging is used and there is a minimal impact in the CPU. As can be
notice even with DSA in place we have better perf.

It was observed by other user that also SQM scenario with cake scheduler
were improved in the order of 100mbps (this scenario is CPU limited and
any increase of perf is caused by removing load on the CPU)

Been at least 15 days that this is in use without any complain or bug
reported about queue timeout. (was the case with v1 before the
additional patch was added, only appear on real world tests and not on
iperf tests)

[1] https://forum.openwrt.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/3427?u=ansuel

Changes v4:
- Fix W=1 warning for missing define of pending_packets
Changes v3:
- Fix compilation error for missing comma
Changes v2:
- Add patch to move tx timer arm outside tx clean.

Christian Marangi (4):
  net: introduce napi_is_scheduled helper
  net: stmmac: improve TX timer arm logic
  net: stmmac: move TX timer arm after DMA enable
  net: stmmac: increase TX coalesce timer to 5ms

 drivers/net/ethernet/chelsio/cxgb3/sge.c      |  8 ----
 drivers/net/ethernet/stmicro/stmmac/common.h  |  2 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 40 +++++++++++++++----
 drivers/net/wireless/realtek/rtw89/core.c     |  2 +-
 include/linux/netdevice.h                     | 23 +++++++++++
 net/core/dev.c                                |  2 +-
 6 files changed, 59 insertions(+), 18 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 19, 2023, 1:50 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 18 Oct 2023 14:35:46 +0200 you wrote:
> This series comes with the intention of restoring original performance
> of stmmac on some router/device that used the stmmac driver to handle
> gigabit traffic.
> 
> More info are present in patch 3. This cover letter is to show results
> and improvements of the following change.
> 
> [...]

Here is the summary with links:
  - [net-next,v4,1/4] net: introduce napi_is_scheduled helper
    https://git.kernel.org/netdev/net-next/c/7f3eb2174512
  - [net-next,v4,2/4] net: stmmac: improve TX timer arm logic
    https://git.kernel.org/netdev/net-next/c/2d1a42cf7f77
  - [net-next,v4,3/4] net: stmmac: move TX timer arm after DMA enable
    https://git.kernel.org/netdev/net-next/c/a594166387fe
  - [net-next,v4,4/4] net: stmmac: increase TX coalesce timer to 5ms
    https://git.kernel.org/netdev/net-next/c/039550960a22

You are awesome, thank you!