From: Wen Yang <wen.yang@linux.dev>
To: K Prateek Nayak <kprateek.nayak@amd.com>,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Ryo Takakura <ryotkkr98@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] softirq: allow raising NET_RX_SOFTIRQ from SMP call on RT
Date: Thu, 25 Dec 2025 00:08:44 +0800 [thread overview]
Message-ID: <6063d0da-4053-4f3c-a79a-0985c82e9649@linux.dev> (raw)
In-Reply-To: <1db9aefe-c9b3-4e9b-b4e3-45c25497e988@amd.com>
On 12/22/25 14:03, K Prateek Nayak wrote:
> Hello Wen,
>
> On 12/19/2025 11:28 PM, wen.yang@linux.dev wrote:
>> From: Wen Yang <wen.yang@linux.dev>
>>
>> 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.
>
prev parent reply other threads:[~2025-12-24 16:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 17:58 [PATCH] softirq: allow raising NET_RX_SOFTIRQ from SMP call on RT wen.yang
2025-12-22 6:03 ` K Prateek Nayak
2025-12-24 16:08 ` Wen Yang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6063d0da-4053-4f3c-a79a-0985c82e9649@linux.dev \
--to=wen.yang@linux.dev \
--cc=bigeasy@linutronix.de \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=peterz@infradead.org \
--cc=ryotkkr98@gmail.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.