* [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT
@ 2023-05-28 17:39 Heiner Kallweit
2023-05-31 6:30 ` Jakub Kicinski
2023-06-01 5:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Heiner Kallweit @ 2023-05-28 17:39 UTC (permalink / raw)
To: Jakub Kicinski, David Miller, Eric Dumazet, Paolo Abeni
Cc: netdev@vger.kernel.org
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.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
net/core/dev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index b3c13e041..58f71d619 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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);
--
2.40.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT
2023-05-28 17:39 [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT Heiner Kallweit
@ 2023-05-31 6:30 ` Jakub Kicinski
2023-05-31 8:18 ` Heiner Kallweit
2023-06-01 5:40 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2023-05-31 6:30 UTC (permalink / raw)
To: Heiner Kallweit
Cc: David Miller, Eric Dumazet, Paolo Abeni, netdev@vger.kernel.org
On Sun, 28 May 2023 19:39:59 +0200 Heiner Kallweit wrote:
> 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.
Did someone complain? I don't have an opinion, but I'm curious what
prompted the patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT
2023-05-31 6:30 ` Jakub Kicinski
@ 2023-05-31 8:18 ` Heiner Kallweit
2023-05-31 18:09 ` Jakub Kicinski
0 siblings, 1 reply; 5+ messages in thread
From: Heiner Kallweit @ 2023-05-31 8:18 UTC (permalink / raw)
To: Jakub Kicinski
Cc: David Miller, Eric Dumazet, Paolo Abeni, netdev@vger.kernel.org
On 31.05.2023 08:30, Jakub Kicinski wrote:
> On Sun, 28 May 2023 19:39:59 +0200 Heiner Kallweit wrote:
>> 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.
>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT
2023-05-31 8:18 ` Heiner Kallweit
@ 2023-05-31 18:09 ` Jakub Kicinski
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2023-05-31 18:09 UTC (permalink / raw)
To: Heiner Kallweit
Cc: David Miller, Eric Dumazet, Paolo Abeni, netdev@vger.kernel.org
On Wed, 31 May 2023 10:18:40 +0200 Heiner Kallweit wrote:
> > 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.
Makes sense.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT
2023-05-28 17:39 [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT Heiner Kallweit
2023-05-31 6:30 ` Jakub Kicinski
@ 2023-06-01 5:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-01 5:40 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: kuba, davem, edumazet, pabeni, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 28 May 2023 19:39:59 +0200 you wrote:
> 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.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-01 5:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-28 17:39 [PATCH net-next] net: don't set sw irq coalescing defaults in case of PREEMPT_RT Heiner Kallweit
2023-05-31 6:30 ` Jakub Kicinski
2023-05-31 8:18 ` Heiner Kallweit
2023-05-31 18:09 ` Jakub Kicinski
2023-06-01 5:40 ` patchwork-bot+netdevbpf
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).