Skip to content

publish last used index (was Re: TX from KVM guest virtio_net to vhost issues)

Michael S. Tsirkin kvm netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio: put last seen used index into ring itselfdrivers/virtio/virtio_ring.c include/linux/virtio_ring.h+27 -92 replies
2/2vhost-net: utilize PUBLISH_USED_IDX featuredrivers/vhost/vhost.c drivers/vhost/vhost.h+61 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] publish last used index (was Re: TX from KVM guest virtio_net to vhost issues)
Quoted 11 lines · Rusty Russell

But if one side outruns the other, it does a lot of unnecessary work notifying/interrupting it over and over again before the host/guest gets a chance to shut notifications/interrupts off. Hence the last_used publishing patch (Xen does this right, I screwed it up).

Long weekend here, and I'm otherwise committed. But if noone has cleaned up that patch by early next week, I'll try to do so and see if we can make a real difference.

Cheers,
Rusty.

I actually had the last_used publishing patch working. Here it is
again: it's the part that publishes the used index from guest and the part that uses it in host to avoid spurious interrupts (this is Tom's case, not Shirley's case)
updated to the latest bits, and clarified the code a bit more.

Note: there's some tricky logic in the vhost part, I think I got it right but please review.

Warning: compiled only, completely untested, I intend to add the bits that use the last available index in guest to reduce exits, test it all together.

Would appreciate review and/or testing.

Michael S. Tsirkin (2):
virtio: put last seen used index into ring itself
vhost-net: utilize PUBLISH_USED_IDX feature

 drivers/vhost/vhost.c        |   58 +++++++++++++++++++++++++++++++++++++----
 drivers/vhost/vhost.h        |    9 ++++++
 drivers/virtio/virtio_ring.c |   25 +++++++++++------
 include/linux/virtio_ring.h  |   11 ++++++++
 4 files changed, 88 insertions(+), 15 deletions(-)
Signature · 1 line
1.7.3.2.91.g446ac