[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 17/17] hw/virtio-pci: introduce num_queues proper
From: |
Ming Lei |
Subject: |
[Qemu-devel] [PATCH v1 17/17] hw/virtio-pci: introduce num_queues property |
Date: |
Tue, 5 Aug 2014 11:33:18 +0800 |
This patch introduces parameter of 'num_queues',
so that virtio-blk can support multi virt queues.
The virtio-blk multi virtqueue feature will be added to
virtio spec 1.1[1], and the 3.17 linux kernel[2] will support
the feature in virtio-blk driver. For those who wants to play
the stuff now, the kernel side patches can be found in either
Jens's block tree[3] or linux-next[4].
In my fio test over VM which is hosted on the server host,
if "num_queues" is set as 4, JOBS of fio script is set
as 4, throughout can be improved by 25% compared with
single virtqueue with any JOBS.
Compared with throughput, scalability is improved much more,
for example:
---------------------------------------------------
| VM in server host, 4 virtqueues vs. 1 virtqueue
---------------------------------------------------
JOBS=2 | +10%
---------------------------------------------------
JOBS=4 | +78%
---------------------------------------------------
[1], http://marc.info/?l=linux-api&m=140486843317107&w=2
[2], http://marc.info/?l=linux-api&m=140418368421229&w=2
[3], http://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git/
#for-3.17/drivers
[4], https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
Signed-off-by: Ming Lei <address@hidden>
---
hw/block/virtio-blk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index baec8f8..58f8296 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -834,6 +834,7 @@ static Property virtio_blk_properties[] = {
DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlock, blk.conf),
DEFINE_PROP_STRING("serial", VirtIOBlock, blk.serial),
DEFINE_PROP_BIT("config-wce", VirtIOBlock, blk.config_wce, 0, true),
+ DEFINE_PROP_UINT32("num_queues", VirtIOBlock, blk.num_queues, 1),
#ifdef __linux__
DEFINE_PROP_BIT("scsi", VirtIOBlock, blk.scsi, 0, true),
#endif
--
1.7.9.5
- [Qemu-devel] [PATCH v1 07/17] block: support to bypass qemu coroutinue, (continued)
- [Qemu-devel] [PATCH v1 07/17] block: support to bypass qemu coroutinue, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 08/17] Revert "raw-posix: drop raw_get_aio_fd() since it is no longer used", Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 09/17] dataplane: enable selective bypassing coroutine, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 10/17] linux-aio: fix submit aio as a batch, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 11/17] linux-aio: handling -EAGAIN for !s->io_q.plugged case, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 12/17] linux-aio: increase max event to 256, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 13/17] linux-aio: remove 'node' from 'struct qemu_laiocb', Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 14/17] hw/virtio/virtio-blk.h: introduce VIRTIO_BLK_F_MQ, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 15/17] virtio-blk: support multi queue for non-dataplane, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 16/17] virtio-blk: dataplane: support multi virtqueue, Ming Lei, 2014/08/04
- [Qemu-devel] [PATCH v1 17/17] hw/virtio-pci: introduce num_queues property,
Ming Lei <=
- Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support, Stefan Hajnoczi, 2014/08/05
- Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support, Kevin Wolf, 2014/08/05