net: don't set sw irq coalescing defaults in case of PREEMPT_RT
Subsystems (2)
PATCH 1/1 net: don't set sw irq coalescing defaults in case of PREEMPT_RT
If PREEMPT_RT is set, then assume that the user focuses on minimum latency. Therefore don't set sw irq coalescing defaults. This affects the defaults only, users can override these settings via sysfs.
--- net/core/dev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/core/dev.c +4 -2
@@ -10568,8 +10568,10 @@ void netdev_sw_irq_coalesce_default_on(struct net_device *dev) {WARN_ON (dev->reg_state ==NETREG_REGISTERED ); - dev->gro_flush_timeout =20000 ; - dev->napi_defer_hard_irqs =1 ; +if (!IS_ENABLED (CONFIG_PREEMPT_RT )) { + dev->gro_flush_timeout =20000 ; + dev->napi_defer_hard_irqs =1 ; + } }EXPORT_SYMBOL_GPL (netdev_sw_irq_coalesce_default_on);
Signature · 1 line
2.40.1
Jakub Kicinski
maintainerQuoted 4 lines · On Sun, 28 May 2023 19:39:59 +0200 Heiner Kallweit wrote:
If
PREEMPT_RTis set, then assume that the user focuses on minimum latency. Therefore don't set sw irq coalescing defaults. This affects the defaults only, users can override these settings via sysfs.
Did someone complain? I don't have an opinion, but I'm curious what prompted the patch.
Quoted 8 lines · Jakub Kicinski
Quoted 4 lines · On Sun, 28 May 2023 19:39:59 +0200 Heiner Kallweit wrote:
If
PREEMPT_RTis set, then assume that the user focuses on minimum latency. Therefore don't set sw irq coalescing defaults. This affects the defaults only, users can override these settings via sysfs.Did someone complain? I don't have an opinion, but I'm curious what prompted the patch.
No direct complain, and not covering exactly this point.
Background: I witnessed some discussions between PREEMPT_RT users (e.g. from linuxcnc project) regarding network latency with RTL8168 NICs. It seems these users aren't really aware of the userspace knobs that the kernel provides for RT optimization. To make their life easier we could optimize few things for latency and use PREEMPT_RT as an indicator.
Jakub Kicinski
maintainerQuoted 10 lines · On Wed, 31 May 2023 10:18:40 +0200 Heiner Kallweit wrote:
Quoted 2 lines
Did someone complain? I don't have an opinion, but I'm curious what prompted the patch.
No direct complain, and not covering exactly this point.
Background: I witnessed some discussions betweenPREEMPT_RTusers (e.g. from linuxcnc project) regarding network latency with RTL8168 NICs. It seems these users aren't really aware of the userspace knobs that the kernel provides for RT optimization. To make their life easier we could optimize few things for latency and usePREEMPT_RTas an indicator.
Makes sense.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Sun, 28 May 2023 19:39:59 +0200 you wrote:
If
PREEMPT_RTis set, then assume that the user focuses on minimum latency. Therefore don't set sw irq coalescing defaults. This affects the defaults only, users can override these settings via sysfs.Signed-off-by Heiner Kallweit <[email protected]>[...]
Here is the summary with links:
- [net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT
https://git.kernel.org/netdev/net-next/c/748b442800e8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html