[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e29147c.8583.19909a12fa2.Coremail.lange_tang@163.com>
Date: Tue, 2 Sep 2025 16:53:02 +0800 (CST)
From: "Lange Tang" <lange_tang@....com>
To: "Jakub Kicinski" <kuba@...nel.org>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Tang Longjun" <tanglongjun@...inos.cn>
Subject: Re:Re: [PATCH] net: remove local_bh_enable during busy poll
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@...nel.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
Powered by blists - more mailing lists