diff mbox series

[net-next] net: cadence: macb: Enable software IRQ coalescing by default

Message ID 20240903184912.4151926-1-sean.anderson@linux.dev (mailing list archive)
State Accepted
Commit d57f7b45945ac0517ff8ea50655f00db6e8d637c
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: cadence: macb: Enable software IRQ coalescing by default | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 38 this patch: 38
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-09-04--15-00 (tests: 718)

Commit Message

Sean Anderson Sept. 3, 2024, 6:49 p.m. UTC
This NIC doesn't have hardware IRQ coalescing. Under high load,
interrupts can adversely affect performance. To mitigate this, enable
software IRQ coalescing by default. On my system this increases receive
throughput with iperf3 from 853 MBit/sec to 934 MBit/s, decreases
interrupts from 69489/sec to 2016/sec, and decreases CPU utilization
from 27% (4x Cortex-A53) to 14%. Latency is not affected (as far as I
can tell).

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
---

 drivers/net/ethernet/cadence/macb_main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Horman Sept. 4, 2024, 4:26 p.m. UTC | #1
On Tue, Sep 03, 2024 at 02:49:12PM -0400, Sean Anderson wrote:
> This NIC doesn't have hardware IRQ coalescing. Under high load,
> interrupts can adversely affect performance. To mitigate this, enable
> software IRQ coalescing by default. On my system this increases receive
> throughput with iperf3 from 853 MBit/sec to 934 MBit/s, decreases
> interrupts from 69489/sec to 2016/sec, and decreases CPU utilization
> from 27% (4x Cortex-A53) to 14%. Latency is not affected (as far as I
> can tell).
> 
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>

Nice performance improvement :)

Reviewed-by: Simon Horman <horms@kernel.org>
patchwork-bot+netdevbpf@kernel.org Sept. 5, 2024, 12:20 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  3 Sep 2024 14:49:12 -0400 you wrote:
> This NIC doesn't have hardware IRQ coalescing. Under high load,
> interrupts can adversely affect performance. To mitigate this, enable
> software IRQ coalescing by default. On my system this increases receive
> throughput with iperf3 from 853 MBit/sec to 934 MBit/s, decreases
> interrupts from 69489/sec to 2016/sec, and decreases CPU utilization
> from 27% (4x Cortex-A53) to 14%. Latency is not affected (as far as I
> can tell).
> 
> [...]

Here is the summary with links:
  - [net-next] net: cadence: macb: Enable software IRQ coalescing by default
    https://git.kernel.org/netdev/net-next/c/d57f7b45945a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 127bb3208034..8e1e4b2b2386 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4184,6 +4184,8 @@  static int macb_init(struct platform_device *pdev)
 		dev->ethtool_ops = &macb_ethtool_ops;
 	}
 
+	netdev_sw_irq_coalesce_default_on(dev);
+
 	dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
 
 	/* Set features */