diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2012-11-14 15:45:38 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-01-02 16:08:51 +0100 |
commit | 392808b49b6aee066d0c1d200e72fc3dc11c9d0f (patch) | |
tree | 1bc5e98807a0356500a99fd8cd842c560622a063 /hw/virtio-pci.c | |
parent | e72f66a0a20f38d0c7576f6c0aec0ca644976e35 (diff) | |
download | qemu-392808b49b6aee066d0c1d200e72fc3dc11c9d0f.zip qemu-392808b49b6aee066d0c1d200e72fc3dc11c9d0f.tar.gz qemu-392808b49b6aee066d0c1d200e72fc3dc11c9d0f.tar.bz2 |
virtio-blk: add x-data-plane=on|off performance feature
The virtio-blk-data-plane feature is easy to integrate into
hw/virtio-blk.c. The data plane can be started and stopped similar to
vhost-net.
Users can take advantage of the virtio-blk-data-plane feature using the
new -device virtio-blk-pci,x-data-plane=on property.
The x-data-plane name was chosen because at this stage the feature is
experimental and likely to see changes in the future.
If the VM configuration does not support virtio-blk-data-plane an error
message is printed. Although we could fall back to regular virtio-blk,
I prefer the explicit approach since it prompts the user to fix their
configuration if they want the performance benefit of
virtio-blk-data-plane.
Limitations:
* Only format=raw is supported
* Live migration is not supported
* Block jobs, hot unplug, and other operations fail with -EBUSY
* I/O throttling limits are ignored
* Only Linux hosts are supported due to Linux AIO usage
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r-- | hw/virtio-pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 3cab783..82761cf 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -896,6 +896,9 @@ static Property virtio_blk_properties[] = { #endif DEFINE_PROP_BIT("config-wce", VirtIOPCIProxy, blk.config_wce, 0, true), DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), +#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE + DEFINE_PROP_BIT("x-data-plane", VirtIOPCIProxy, blk.data_plane, 0, false), +#endif DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), DEFINE_VIRTIO_BLK_FEATURES(VirtIOPCIProxy, host_features), DEFINE_PROP_END_OF_LIST(), |