[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH -V2 01/13] hw/9pfs: Use ioeventfd for 9p
From: |
Aneesh Kumar K.V |
Subject: |
[Qemu-devel] [PATCH -V2 01/13] hw/9pfs: Use ioeventfd for 9p |
Date: |
Tue, 11 Oct 2011 16:11:33 +0530 |
From: "Aneesh Kumar K.V" <address@hidden>
With ioeventfd:
address@hidden 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:
address@hidden 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 <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>
---
hw/9pfs/virtio-9p-device.c | 2 ++
hw/virtio-pci.c | 5 -----
hw/virtio-pci.h | 5 +++++
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 513e181..e5b68da 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -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),
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index df27c19..ca5923c 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -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.
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h
index 14c10f7..f8404de 100644
--- a/hw/virtio-pci.h
+++ b/hw/virtio-pci.h
@@ -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;
--
1.7.5.4
- [Qemu-devel] [PATCH V2 00/13] VirtFS update, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 01/13] hw/9pfs: Use ioeventfd for 9p,
Aneesh Kumar K.V <=
- [Qemu-devel] [PATCH -V2 08/13] hw/9pfs: Add st_gen support in getattr reply, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 04/13] hw/9pfs: Fix build error on platform that don't support futimens, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 07/13] hw/9pfs: Add open flag mapping, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 12/13] scripts: Simpletrace log analysis script for pretty-printing 9p log., Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 09/13] hw/9pfs: Add st_gen support for handle based fs driver, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 02/13] hw/9pfs: Add new virtfs option cache=writethrough to skip host page cache, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 13/13] hw/9pfs: Use fs driver specific lstat, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 11/13] hw/9pfs: Remove virtio-9p-debug.* infra to be replaced by Qemu Tracing., Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 05/13] virtio-9p: Use 9P specific Lock constants, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 06/13] hw/9pfs: Ensure an error is reported to user if 9pfs mount tag is too long, Aneesh Kumar K.V, 2011/10/11