From: Longjun Tang <[email protected]>

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


Reply via email to