Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dev: Remove PREEMPT_RT ifdefs from backlog_lock.*().

The backlog_napi locking (previously RPS) relies on explicit locking if
either RPS or backlog NAPI is enabled. If both are disabled then locking
was achieved by disabling interrupts except on PREEMPT_RT. PREEMPT_RT
was excluded because the needed synchronisation was already provided
local_bh_disable().

Since the introduction of backlog NAPI and making it mandatory for
PREEMPT_RT the ifdef within backlog_lock.*() is obsolete and can be
removed.

Remove the ifdefs in backlog_lock.*().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20240620132727.660738-10-bigeasy@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Sebastian Andrzej Siewior and committed by
Jakub Kicinski
a8760d0d ecefbc09

+4 -4
+4 -4
net/core/dev.c
··· 229 229 { 230 230 if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) 231 231 spin_lock_irqsave(&sd->input_pkt_queue.lock, *flags); 232 - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) 232 + else 233 233 local_irq_save(*flags); 234 234 } 235 235 ··· 237 237 { 238 238 if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) 239 239 spin_lock_irq(&sd->input_pkt_queue.lock); 240 - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) 240 + else 241 241 local_irq_disable(); 242 242 } 243 243 ··· 246 246 { 247 247 if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) 248 248 spin_unlock_irqrestore(&sd->input_pkt_queue.lock, *flags); 249 - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) 249 + else 250 250 local_irq_restore(*flags); 251 251 } 252 252 ··· 254 254 { 255 255 if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) 256 256 spin_unlock_irq(&sd->input_pkt_queue.lock); 257 - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) 257 + else 258 258 local_irq_enable(); 259 259 } 260 260