netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: Handle threadirqs in __napi_schedule_irqoff
@ 2024-09-13 15:09 Sean Anderson
  2024-09-13 15:16 ` Eric Dumazet
  2024-09-13 16:14 ` Sebastian Andrzej Siewior
  0 siblings, 2 replies; 8+ messages in thread
From: Sean Anderson @ 2024-09-13 15:09 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev
  Cc: Juri Lelli, Thomas Gleixner, Sebastian Andrzej Siewior,
	linux-kernel, Sean Anderson

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@linux.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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-09-30  9:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13 15:09 [PATCH] net: Handle threadirqs in __napi_schedule_irqoff Sean Anderson
2024-09-13 15:16 ` Eric Dumazet
2024-09-13 15:23   ` Sean Anderson
2024-09-13 16:08     ` Brett Creeley
2024-09-13 16:17       ` Sean Anderson
2024-09-13 16:14 ` Sebastian Andrzej Siewior
2024-09-13 16:19   ` Sean Anderson
2024-09-30  9:55     ` Sebastian Andrzej Siewior

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).