Re: [PATCH] softirq: allow raising NET_RX_SOFTIRQ from SMP call on RT

From: Wen Yang
Date: Wed Dec 24 2025 - 11:09:20 EST




On 12/22/25 14:03, K Prateek Nayak wrote:
Hello Wen,

On 12/19/2025 11:28 PM, wen.yang@xxxxxxxxx wrote:
From: Wen Yang <wen.yang@xxxxxxxxx>

RPS distributes network processing load across CPUs by enqueuing
packets on a remote CPU's backlog and raising NET_RX_SOFTIRQ to
process them. This is done via an smp_call_function.

I'm assuming net_rps_send_ipi() is the function responsible for IPIs
and the only two callers - net_rps_action_and_irq_enable() and
dev_cpu_dead() - first check for "!use_backlog_threads()" before
sending the IPI which is always false in case of PREEMPT_RT.

What is the path where you end up sending this IPI on PREEMPT_RT?
Can you please trace the path of this problematic IPI on the latest
upstream and prevent that instead?


Thank you for your suggestion.
Our production environment uses 6.1 and 6.6 kernels, and after porting commit dad6b9770263 ("net: Allow to use SMP threads for backlog NAPI.") and its dependent patches, this issue has indeed been fixed.

--
Best wishes,
Wen


On PREEMPT_RT kernels, raising a softirq from an SMP call function
can increase preemption-off latencies. A WARN_ON_ONCE() in
do_softirq_post_smp_call_flush() enforces this.

A previous commit 6675ce20046d ("softirq: Allow raising SCHED_SOFTIRQ from SMP-call-function on RT kernel")

There is also a good justification in 6675ce20046d that idle load
balancing periodically checks need_resched() and will bail out
immediately if it detects a wakeup but the same cannot be expected of
all NET_RX_SOFTIRQ handlers so ignoring the warning isn't a solution.