netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Longjun Tang <lange_tang@163.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	tanglongjun@kylinos.cn
Subject: Re: [PATCH] net: remove local_bh_enable during busy poll
Date: Mon, 1 Sep 2025 13:23:30 -0700	[thread overview]
Message-ID: <20250901132330.589f4ac5@kernel.org> (raw)
In-Reply-To: <20250829030456.489405-1-lange_tang@163.com>

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

  reply	other threads:[~2025-09-01 20:23 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 [this message]
2025-09-02  8:53   ` Lange Tang
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=20250901132330.589f4ac5@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=lange_tang@163.com \
    --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).