virtio and vhost-net performance enhancements
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest18 patches 54 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | virtio: 64 bit featuresdrivers/ drivers/ drivers/ +5 more | +60 | 0 replies | |
| 1/18 | virtio: 64 bit featuresdrivers/ drivers/ drivers/ +5 more | +60 | 0 replies | |
| 2/18 | virtio_test: update for 64 bit featurestools/ | +6 | 0 replies | |
| 3/18 | vhost: fix 64 bit featuresdrivers/ | +4 | 0 replies | |
| 4/18 | virtio: don't delay avail index updatedrivers/ | +5 | 0 replies | |
| 4/18 | virtio: don't delay avail index updatedrivers/ | +5 | 0 replies | |
| 5/18 | virtio: used event index interfaceinclude/ | +9 | 4 replies | |
| 6/18 | virtio_ring: avail event index interfaceinclude/ | +8 | 10 replies | |
| 7/18 | virtio ring: inline function to check for eventsinclude/ | +14 | 4 replies | |
| 7/18 | virtio ring: inline function to check for eventsinclude/ | +14 | 0 replies | |
| 8/18 | virtio_ring: support for used_event idx featuredrivers/ | +14 | 4 replies | |
| 9/18 | virtio: use avail_event indexdrivers/ | +38 | 20 replies | |
| 10/18 | vhost: utilize used_event indexdrivers/ drivers/ | +63 | 0 replies | |
| 11/18 | vhost: support avail_event idxdrivers/ drivers/ drivers/ +1 more | +67 | 0 replies | |
| 12/18 | virtio_test: support used_event indextools/ | +16 | 0 replies | |
| 13/18 | virtio_test: avail_event index supporttools/ | +15 | 0 replies | |
| 13/18 | virtio_test: avail_event index supporttools/ | +15 | 0 replies | |
| 14/18 | virtio: add api for delayed callbacksdrivers/ include/ | +36 | 10 replies | |
| 15/18 | virtio_net: delay TX callbacksdrivers/ | +1 | 0 replies | |
| 15/18 | virtio_net: delay TX callbacksdrivers/ | +1 | 0 replies | |
| 16/18 | virtio_ring: Add capacity check APIdrivers/ include/ | +13 | 0 replies | |
| 17/18 | virtio_net: fix TX capacity checks using new APIdrivers/ | +4 | 0 replies | |
| 18/18 | virtio_net: limit xmit pollingdrivers/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/18] virtio and vhost-net performance enhancements
OK, here's a large patchset that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
I know it's a lot to ask but please test, and please consider for 2.6.40 :)
I see nice performance improvements: one run showed going from 12 to 18 Gbit/s host to guest with netperf, but I did not spend a lot of time testing performance, so no guarantees it's not a fluke, I hope others will try this out and report.
Pls note I will be away from keyboard for the next week.
Essentially we change virtio ring notification hand-off to work like the one in Xen -
each side publishes an event index, the other one notifies when it reaches that value -
With the one difference that event index starts at 0, same as request index (in xen event index starts at 1).
Each side of the handoff has a feature bit independent of the other one, so we can have e.g. interrupts handled in the new way and exits in the old one.
This is actually what made the patchset larger:
we run out of feature bits so I had to add some more. I tested various combinations of hosts and guests and this code seems to be solid.
With the indexes in place it becomes possbile to request an event after many requests (and not just on the next one as done now). This shall fix the TX queue overrun which currently triggers a storm of interrupts.
The patches are mostly independent and can also be cherry-picked, hopefully there won't be much need of that.
One dependency I'd like to note is on two cleanup patches:
the patch removing batching of available index updates and the patch fixing ring capability checks in virtio-net. This simplified code a bit and made the following patch simpler.
I could unwrap the dependency but prefer as is.
The patchset is on top of net-next which at the time I last rebased was 15ecd03 - so roughly 2.6.39-rc2.
qemu patch will follow shortly.
Rusty, I think (in the hope it will come to that) it will be easier to merge vhost and virtio bits in one go. Can all go in through your tree (Dave in the past acked a very similar patch so should not be a problem) or from me to Dave Miller.
I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not spend a lot of time testing performance, and I will be away from keyboard for the next week. I hope others will try this out and report.
Michael S. Tsirkin (17):
virtio: 64 bit features
virtio_test: update for 64 bit features
vhost: fix 64 bit features
virtio: don't delay avail index update
virtio: used event index interface
virtio_ring: avail event index interface virtio ring: inline function to check for events
virtio_ring: support for used_event idx feature
virtio: use avail_event index
vhost: utilize used_event index
vhost: support avail_event idx
virtio_test: support used_event index
virtio_test: avail_event index support
virtio: add api for delayed callbacks
virtio_net: delay TX callbacks
virtio_net: fix TX capacity checks using new API
virtio_net: limit xmit polling
Shirley Ma (1):
virtio_ring: Add capacity check API
drivers/lguest/lguest_device.c | 8 +- drivers/net/virtio_net.c | 25 ++++--- drivers/s390/kvm/kvm_virtio.c | 8 +- drivers/vhost/net.c | 12 ++-- drivers/vhost/test.c | 6 +- drivers/vhost/vhost.c | 139 ++++++++++++++++++++++++++++++---------- drivers/vhost/vhost.h | 30 ++++++--- drivers/virtio/virtio.c | 8 +- drivers/virtio/virtio_pci.c | 34 ++++++++-- drivers/virtio/virtio_ring.c | 105 +++++++++++++++++++++++++++--- include/linux/virtio.h | 16 ++++- include/linux/virtio_config.h | 15 +++-- include/linux/virtio_pci.h | 9 ++- include/linux/virtio_ring.h | 30 ++++++++- tools/virtio/virtio_test.c | 39 ++++++++++- 15 files changed, 377 insertions(+), 107 deletions(-)
Signature · 1 line
1.7.5.53.gc233e