All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/9] xen-block: support multi hardware-queues/rings
@ 2015-09-05 12:39 Bob Liu
  2015-09-05 12:39 ` [PATCH v3 1/9] xen-blkfront: convert to blk-mq APIs Bob Liu
                   ` (14 more replies)
  0 siblings, 15 replies; 84+ messages in thread
From: Bob Liu @ 2015-09-05 12:39 UTC (permalink / raw)
  To: xen-devel
  Cc: david.vrabel, linux-kernel, roger.pau, konrad.wilk,
	felipe.franciosi, axboe, hch, avanzini.arianna, rafal.mielniczuk,
	boris.ostrovsky, jonathan.davies, Bob Liu

Note: These patches were based on original work of Arianna's internship for
GNOME's Outreach Program for Women.

The first patch which just convert xen-blkfront driver to use blk-mq api has
been applied by David.

After using blk-mq api, a guest has more than one(nr_vpus) software request
queues associated with each block front. These queues can be mapped over several
rings(hardware queues) to the backend, making it very easy for us to run
multiple threads on the backend for a single virtual disk.

By having different threads issuing requests at the same time, the performance
of guest can be improved significantly in the end.

Test was done based on null_blk driver:
dom0: v4.2-rc8 16vcpus 10GB "modprobe null_blk"
domu: v4.2-rc8 16vcpus 10GB

[test]
rw=read or randread
direct=1
ioengine=libaio
bs=4k
time_based
runtime=30
filename=/dev/xvdb
numjobs=16
iodepth=64
iodepth_batch=64
iodepth_batch_complete=64
group_reporting

Seqread:
	dom0 	domU(no_mq) 	domU(4 queues) 	 8 queues 	16 queues
iops:  1308k        690k        1380k(+200%)        1238k           1471k

Randread:
	dom0 	domU(no_mq) 	domU(4 queues) 	 8 queues 	16 queues
iops:  1310k        279k        810k(+200%)          871k           1000k

Only with 4queues, iops for domU get improved a lot and nearly catch up with
dom0. There were also similar huge improvement for write and real SSD storage.

---
v3: Rebased to v4.2-rc8

Bob Liu (9):
  xen-blkfront: convert to blk-mq APIs
  xen-block: add document for mutli hardware queues/rings
  xen/blkfront: separate per ring information out of device info
  xen/blkfront: pseudo support for multi hardware queues/rings
  xen/blkfront: convert per device io_lock to per ring ring_lock
  xen/blkfront: negotiate the number of hw queues/rings with backend
  xen/blkback: separate ring information out of struct xen_blkif
  xen/blkback: pseudo support for multi hardware queues/rings
  xen/blkback: get number of hardware queues/rings from blkfront

 drivers/block/xen-blkback/blkback.c |  373 +++++-----
 drivers/block/xen-blkback/common.h  |   53 +-
 drivers/block/xen-blkback/xenbus.c  |  376 ++++++----
 drivers/block/xen-blkfront.c        | 1343 ++++++++++++++++++++---------------
 include/xen/interface/io/blkif.h    |   32 +
 5 files changed, 1278 insertions(+), 899 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 84+ messages in thread
* [PATCH v3 0/9] xen-block: support multi hardware-queues/rings
@ 2015-09-05 12:39 Bob Liu
  0 siblings, 0 replies; 84+ messages in thread
From: Bob Liu @ 2015-09-05 12:39 UTC (permalink / raw)
  To: xen-devel
  Cc: hch, felipe.franciosi, rafal.mielniczuk, linux-kernel,
	jonathan.davies, axboe, Bob Liu, david.vrabel, avanzini.arianna,
	boris.ostrovsky, roger.pau

Note: These patches were based on original work of Arianna's internship for
GNOME's Outreach Program for Women.

The first patch which just convert xen-blkfront driver to use blk-mq api has
been applied by David.

After using blk-mq api, a guest has more than one(nr_vpus) software request
queues associated with each block front. These queues can be mapped over several
rings(hardware queues) to the backend, making it very easy for us to run
multiple threads on the backend for a single virtual disk.

By having different threads issuing requests at the same time, the performance
of guest can be improved significantly in the end.

Test was done based on null_blk driver:
dom0: v4.2-rc8 16vcpus 10GB "modprobe null_blk"
domu: v4.2-rc8 16vcpus 10GB

[test]
rw=read or randread
direct=1
ioengine=libaio
bs=4k
time_based
runtime=30
filename=/dev/xvdb
numjobs=16
iodepth=64
iodepth_batch=64
iodepth_batch_complete=64
group_reporting

Seqread:
	dom0 	domU(no_mq) 	domU(4 queues) 	 8 queues 	16 queues
iops:  1308k        690k        1380k(+200%)        1238k           1471k

Randread:
	dom0 	domU(no_mq) 	domU(4 queues) 	 8 queues 	16 queues
iops:  1310k        279k        810k(+200%)          871k           1000k

Only with 4queues, iops for domU get improved a lot and nearly catch up with
dom0. There were also similar huge improvement for write and real SSD storage.

---
v3: Rebased to v4.2-rc8

Bob Liu (9):
  xen-blkfront: convert to blk-mq APIs
  xen-block: add document for mutli hardware queues/rings
  xen/blkfront: separate per ring information out of device info
  xen/blkfront: pseudo support for multi hardware queues/rings
  xen/blkfront: convert per device io_lock to per ring ring_lock
  xen/blkfront: negotiate the number of hw queues/rings with backend
  xen/blkback: separate ring information out of struct xen_blkif
  xen/blkback: pseudo support for multi hardware queues/rings
  xen/blkback: get number of hardware queues/rings from blkfront

 drivers/block/xen-blkback/blkback.c |  373 +++++-----
 drivers/block/xen-blkback/common.h  |   53 +-
 drivers/block/xen-blkback/xenbus.c  |  376 ++++++----
 drivers/block/xen-blkfront.c        | 1343 ++++++++++++++++++++---------------
 include/xen/interface/io/blkif.h    |   32 +
 5 files changed, 1278 insertions(+), 899 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 84+ messages in thread

end of thread, other threads:[~2015-10-19 10:04 UTC | newest]

Thread overview: 84+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-05 12:39 [PATCH v3 0/9] xen-block: support multi hardware-queues/rings Bob Liu
2015-09-05 12:39 ` [PATCH v3 1/9] xen-blkfront: convert to blk-mq APIs Bob Liu
2015-09-05 12:39 ` Bob Liu
2015-09-23 20:31   ` Konrad Rzeszutek Wilk
2015-09-23 21:12     ` Konrad Rzeszutek Wilk
2015-09-23 21:12     ` Konrad Rzeszutek Wilk
2015-09-23 20:31   ` Konrad Rzeszutek Wilk
2015-09-05 12:39 ` [PATCH v3 2/9] xen-block: add document for mutli hardware queues/rings Bob Liu
2015-09-05 12:39 ` Bob Liu
2015-09-23 20:32   ` Konrad Rzeszutek Wilk
2015-09-23 20:32   ` Konrad Rzeszutek Wilk
2015-10-02 16:04   ` Roger Pau Monné
2015-10-02 16:12     ` Wei Liu
2015-10-02 16:12     ` [Xen-devel] " Wei Liu
2015-10-02 16:22       ` Roger Pau Monné
2015-10-02 16:22       ` [Xen-devel] " Roger Pau Monné
2015-10-02 23:55         ` Bob Liu
2015-10-02 23:55         ` Bob Liu
2015-10-02 16:04   ` Roger Pau Monné
2015-09-05 12:39 ` [PATCH v3 3/9] xen/blkfront: separate per ring information out of device info Bob Liu
2015-10-02 17:02   ` Roger Pau Monné
2015-10-03  0:34     ` Bob Liu
2015-10-03  0:34     ` Bob Liu
2015-10-05 15:17       ` Roger Pau Monné
2015-10-05 15:17       ` Roger Pau Monné
2015-10-10  8:30     ` Bob Liu
2015-10-19  9:42       ` Roger Pau Monné
2015-10-19  9:42       ` Roger Pau Monné
2015-10-10  8:30     ` Bob Liu
2015-10-02 17:02   ` Roger Pau Monné
2015-09-05 12:39 ` Bob Liu
2015-09-05 12:39 ` [PATCH v3 4/9] xen/blkfront: pseudo support for multi hardware queues/rings Bob Liu
2015-10-05 10:52   ` Roger Pau Monné
2015-10-07 10:28     ` Bob Liu
2015-10-07 10:28     ` Bob Liu
2015-10-05 10:52   ` Roger Pau Monné
2015-09-05 12:39 ` Bob Liu
2015-09-05 12:39 ` [PATCH v3 5/9] xen/blkfront: convert per device io_lock to per ring ring_lock Bob Liu
2015-09-05 12:39   ` Bob Liu
2015-10-05 14:13   ` Roger Pau Monné
2015-10-05 14:13   ` Roger Pau Monné
2015-10-07 10:34     ` Bob Liu
2015-10-07 10:34     ` Bob Liu
2015-09-05 12:39 ` [PATCH v3 6/9] xen/blkfront: negotiate the number of hw queues/rings with backend Bob Liu
2015-09-05 12:39   ` Bob Liu
2015-10-05 14:40   ` Roger Pau Monné
2015-10-07 10:39     ` Bob Liu
2015-10-07 10:39     ` Bob Liu
2015-10-07 11:46       ` Roger Pau Monné
2015-10-07 12:19         ` Bob Liu
2015-10-07 12:19         ` Bob Liu
2015-10-07 11:46       ` Roger Pau Monné
2015-10-05 14:40   ` Roger Pau Monné
2015-09-05 12:39 ` [PATCH v3 7/9] xen/blkback: separate ring information out of struct xen_blkif Bob Liu
2015-09-05 12:39   ` Bob Liu
2015-10-05 14:55   ` Roger Pau Monné
2015-10-07 10:41     ` Bob Liu
2015-10-07 10:41     ` Bob Liu
2015-10-10  4:08     ` Bob Liu
2015-10-19  9:36       ` Roger Pau Monné
2015-10-19  9:36       ` Roger Pau Monné
2015-10-19 10:03         ` Bob Liu
2015-10-19 10:03         ` Bob Liu
2015-10-10  4:08     ` Bob Liu
2015-10-05 14:55   ` Roger Pau Monné
2015-10-05 14:55   ` Roger Pau Monné
2015-10-05 14:55   ` Roger Pau Monné
2015-09-05 12:39 ` [PATCH v3 8/9] xen/blkback: pseudo support for multi hardware queues/rings Bob Liu
2015-09-05 12:39   ` Bob Liu
2015-10-05 15:08   ` Roger Pau Monné
2015-10-05 15:08   ` Roger Pau Monné
2015-10-07 10:50     ` Bob Liu
2015-10-07 11:49       ` Roger Pau Monné
2015-10-07 11:49       ` Roger Pau Monné
2015-10-07 10:50     ` Bob Liu
2015-09-05 12:39 ` [PATCH v3 9/9] xen/blkback: get number of hardware queues/rings from blkfront Bob Liu
2015-09-05 12:39   ` Bob Liu
2015-10-05 15:15   ` Roger Pau Monné
2015-10-05 15:15   ` Roger Pau Monné
2015-10-07 10:54     ` Bob Liu
2015-10-07 10:54     ` Bob Liu
2015-10-02  9:57 ` [PATCH v3 0/9] xen-block: support multi hardware-queues/rings Rafal Mielniczuk
2015-10-02  9:57 ` Rafal Mielniczuk
2015-09-05 12:39 Bob Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.