[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240913150954.2287196-1-sean.anderson@linux.dev>
Date: Fri, 13 Sep 2024 11:09:54 -0400
From: Sean Anderson <sean.anderson@...ux.dev>
To: "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org
Cc: Juri Lelli <juri.lelli@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org,
Sean Anderson <sean.anderson@...ux.dev>
Subject: [PATCH] net: Handle threadirqs in __napi_schedule_irqoff
The threadirqs kernel parameter can be used to force threaded IRQs even
on non-PREEMPT_RT kernels. Use force_irqthreads to determine if we can
skip disabling local interrupts. This defaults to false on regular
kernels, and is always true on PREEMPT_RT kernels.
Signed-off-by: Sean Anderson <sean.anderson@...ux.dev>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 1e740faf9e78..112e871bc2b0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6202,7 +6202,7 @@ EXPORT_SYMBOL(napi_schedule_prep);
*/
void __napi_schedule_irqoff(struct napi_struct *n)
{
- if (!IS_ENABLED(CONFIG_PREEMPT_RT))
+ if (!force_irqthreads())
____napi_schedule(this_cpu_ptr(&softnet_data), n);
else
__napi_schedule(n);
--
2.35.1.1320.gc452695387.dirty
Powered by blists - more mailing lists