Skip to content

Commit

Permalink
net: don't set sw irq coalescing defaults in case of PREEMPT_RT
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/f9439c7f-c92c-4c2c-703e-110f96d841b7@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Heiner Kallweit authored and Jakub Kicinski committed Jun 1, 2023
1 parent 60cbd38 commit 748b442
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -10571,8 +10571,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);

Expand Down

0 comments on commit 748b442

Please sign in to comment.