Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH 0/2] fix virtio_net/virtio when in busy-polling
@ 2026-03-31 10:26 Longjun Tang
  2026-03-31 10:26 ` [PATCH 1/2] virtio_net: disable cb " Longjun Tang
  2026-03-31 10:26 ` [PATCH 2/2] virtio_ring: return IRQ_HANDLED for stale interrupts when cb disabled Longjun Tang
  0 siblings, 2 replies; 7+ messages in thread
From: Longjun Tang @ 2026-03-31 10:26 UTC (permalink / raw)
  To: mst, jasowang, xuanzhuo, edumazet; +Cc: lange_tang, tanglongjun, virtualization

From: Longjun Tang <tanglongjun@kylinos.cn>

hi,
about this two patch:
1. virtio_net: disable cb when in busy-polling
When in a busy-polling context, it's possible to be in an enable cb 
state,even though it doesn't need to be. This can lead to vring_interrupt
returning IRQ_NONE. so, This patch proactively disables the cb when
in busy_polling.

2. virtio_ring: return IRQ_HANDLED for stale interrupts when cb disabled
In the vring_interrupt, if the used ring is empty, IRQ_NONE is returned.
However,Sometimes, such as with busy-polling, buffers might be consumed
from the used ring before an stale interrupt notification arrives. it
leading to return IRQ_NONE.The kernel's spurious-IRQ detector counts 
consecutive IRQ_NONE returnsand will permanently disable the interrupt 
line if 99,900 out of 100,000 interrupts go unhandled. so, this patch
add is_cb_disabled() to virtqueue_ops and, when more_used() is false but
cb are suppressed, return IRQ_HANDLED instead of IRQ_NONE so the spurious
counter does not accumulate.

stale interrupts: the device posted this notification before it observed
the cb suppression;


Longjun Tang (2):
  virtio_net: disable cb when in busy-polling
  virtio_ring: return IRQ_HANDLED for stale interrupts when cb disabled

 drivers/net/virtio_net.c     |  3 +++
 drivers/virtio/virtio_ring.c | 29 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-07  7:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 10:26 [PATCH 0/2] fix virtio_net/virtio when in busy-polling Longjun Tang
2026-03-31 10:26 ` [PATCH 1/2] virtio_net: disable cb " Longjun Tang
2026-04-03  2:57   ` Jason Wang
2026-04-07  7:02     ` Lange Tang
2026-03-31 10:26 ` [PATCH 2/2] virtio_ring: return IRQ_HANDLED for stale interrupts when cb disabled Longjun Tang
2026-04-03  2:55   ` Jason Wang
2026-04-07  7:28     ` Lange Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox