diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2021-10-01 16:58:41 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-01 15:45:10 -0700 |
commit | 20ab39d13e2e9f916cf570fc834f2cadd6e5dc4a (patch) | |
tree | ab60af79e4689c98dc28042557aac8abcd586572 /net/Kconfig | |
parent | 05f1e35a13542bee0b3b83549a635560aaa94d90 (diff) | |
download | linux-20ab39d13e2e9f916cf570fc834f2cadd6e5dc4a.tar.gz linux-20ab39d13e2e9f916cf570fc834f2cadd6e5dc4a.tar.bz2 linux-20ab39d13e2e9f916cf570fc834f2cadd6e5dc4a.zip |
net/core: disable NET_RX_BUSY_POLL on PREEMPT_RT
napi_busy_loop() disables preemption and performs a NAPI poll. We can't acquire
sleeping locks with disabled preemption which would be required while
__napi_poll() invokes the callback of the driver.
A threaded interrupt performing the NAPI-poll can be preempted on PREEMPT_RT.
A RT thread on another CPU may observe NAPIF_STATE_SCHED bit set and busy-spin
until it is cleared or its spin time runs out. Given it is the task with the
highest priority it will never observe the NEED_RESCHED bit set.
In this case the time is better spent by simply sleeping.
The NET_RX_BUSY_POLL is disabled by default (the system wide sysctls for
poll/read are set to zero). Disabling NET_RX_BUSY_POLL on PREEMPT_RT to avoid
wrong locking context in case it is used.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20211001145841.2308454-1-bigeasy@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/Kconfig')
-rw-r--r-- | net/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/Kconfig b/net/Kconfig index fb13460c6dab..074472dfa94a 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -294,7 +294,7 @@ config CGROUP_NET_CLASSID config NET_RX_BUSY_POLL bool - default y + default y if !PREEMPT_RT config BQL bool |