mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 21:40:49 +00:00
hw/9pfs: Use ioeventfd for 9p
With ioeventfd: [root@qemu-img-64 storage]# dd if=/dev/zero of=/storage/testx bs=8k count=131072 oflag=direct 131072+0 records in 131072+0 records out 1073741824 bytes (1.1 GB) copied, 26.767 s, 40.1 MB/s Without: [root@qemu-img-64 storage]# dd if=/dev/zero of=/storage/testx bs=8k count=131072 oflag=direct 131072+0 records in 131072+0 records out 1073741824 bytes (1.1 GB) copied, 65.3361 s, 16.4 MB/s Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
ebffe2afce
commit
5745e38afe
@ -169,6 +169,8 @@ static PCIDeviceInfo virtio_9p_info = {
|
||||
.revision = VIRTIO_PCI_ABI_VERSION,
|
||||
.class_id = 0x2,
|
||||
.qdev.props = (Property[]) {
|
||||
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
|
||||
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
|
||||
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
|
||||
DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
|
||||
DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag),
|
||||
|
@ -83,11 +83,6 @@
|
||||
/* Flags track per-device state like workarounds for quirks in older guests. */
|
||||
#define VIRTIO_PCI_FLAG_BUS_MASTER_BUG (1 << 0)
|
||||
|
||||
/* Performance improves when virtqueue kick processing is decoupled from the
|
||||
* vcpu thread using ioeventfd for some devices. */
|
||||
#define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1
|
||||
#define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT)
|
||||
|
||||
/* QEMU doesn't strictly need write barriers since everything runs in
|
||||
* lock-step. We'll leave the calls to wmb() in though to make it obvious for
|
||||
* KVM or if kqemu gets SMP support.
|
||||
|
@ -18,6 +18,11 @@
|
||||
#include "virtio-net.h"
|
||||
#include "virtio-serial.h"
|
||||
|
||||
/* Performance improves when virtqueue kick processing is decoupled from the
|
||||
* vcpu thread using ioeventfd for some devices. */
|
||||
#define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1
|
||||
#define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT)
|
||||
|
||||
typedef struct {
|
||||
PCIDevice pci_dev;
|
||||
VirtIODevice *vdev;
|
||||
|
Loading…
Reference in New Issue
Block a user