From: "Lange Tang" <lange_tang@163.com>
To: "Jakub Kicinski" <kuba@kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Tang Longjun" <tanglongjun@kylinos.cn>
Subject: Re:Re: [PATCH] net: remove local_bh_enable during busy poll
Date: Tue, 2 Sep 2025 16:53:02 +0800 (CST) [thread overview]
Message-ID: <2e29147c.8583.19909a12fa2.Coremail.lange_tang@163.com> (raw)
In-Reply-To: <20250901132330.589f4ac5@kernel.org>
Thanks for your reply!
I've done some testing, pps=350000,net.core.busy_read=50.
Before apply this patch: unhandled ≈ 6400/s
After apply this patch: unhandled < 10/s
As you said, the driver needs to discern spurious interrupts in above describing situation, which I strongly agree with. and I also think that it's necessary to remove local_bh_enable during busy polling, as it causes interrupts to be enabled during the busy poll.
I think fix this issue requires two patches, in addition to this patch, another patch is needed from the driver side to discern spurious interrupts.
At 2025-09-02 04:23:30, "Jakub Kicinski" <kuba@kernel.org> wrote:
>On Fri, 29 Aug 2025 11:04:56 +0800 Longjun Tang wrote:
>> When CONFIG_NET_RX_BUSY_POLL==Y and net.core.busy_read > 0,
>> the __napi_busy_loop function calls napi_poll to perform busy polling,
>> such as in the case of virtio_net's virnet_poll. If interrupts are enabled
>> during the busy polling process, it is possible that data has already been
>> received and that last_used_idx is updated before the interrupt is handled.
>> This can lead to the vring_interrupt returning IRQ_NONE in response to the
>> interrupt because used_idx == last_used_idx, which is considered a spurious
>> interrupt.Once certain conditions are met, this interrupt can be disabled.
>
>I'm not sure this patch completely fixes the issue you're describing.
>It just makes it less likely to happen. Really, it feels like the onus
>for fixing this is on the driver that can't discern its own IRQ sources.
>--
>pw-bot: cr
next prev parent reply other threads:[~2025-09-02 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 3:04 [PATCH] net: remove local_bh_enable during busy poll Longjun Tang
2025-09-01 20:23 ` Jakub Kicinski
2025-09-02 8:53 ` Lange Tang [this message]
2025-09-02 10:34 ` Eric Dumazet
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=2e29147c.8583.19909a12fa2.Coremail.lange_tang@163.com \
--to=lange_tang@163.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tanglongjun@kylinos.cn \
/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 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).