diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2023-05-28 19:39:59 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-05-31 22:22:26 -0700 |
commit | 748b442800e877a93a4fa1256418d0b66bdc55ce (patch) | |
tree | 0c3246915cc1ce2ee558ecd1130e171e22e87a59 /net/core | |
parent | 60cbd38bb0ad9e4395fba9c6994f258f1d6cad51 (diff) | |
download | lwn-748b442800e877a93a4fa1256418d0b66bdc55ce.tar.gz lwn-748b442800e877a93a4fa1256418d0b66bdc55ce.zip |
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.
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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 3393c2f3dbe8..99d99b247bc9 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -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); |