All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: Felipe Franciosi <felipe.franciosi@citrix.com>
Cc: "hch@infradead.org" <hch@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"axboe@fb.com" <axboe@fb.com>,
	David Vrabel <david.vrabel@citrix.com>,
	"avanzini.arianna@gmail.com" <avanzini.arianna@gmail.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [RFC PATCH 00/10] Multi-queue support for xen-block driver
Date: Thu, 19 Feb 2015 10:04:44 +0800	[thread overview]
Message-ID: <54E544BC.1090703__30748.5749166974$1424311666$gmane$org@oracle.com> (raw)
In-Reply-To: <9F2C4E7DFB7839489C89757A66C5AD629EBA35@AMSPEX01CL03.citrite.net>


On 02/19/2015 02:22 AM, Felipe Franciosi wrote:
> 
> 
>> -----Original Message-----
>> From: Bob Liu [mailto:bob.liu@oracle.com]
>> Sent: 15 February 2015 08:19
>> To: xen-devel@lists.xen.org
>> Cc: David Vrabel; linux-kernel@vger.kernel.org; Roger Pau Monne;
>> konrad.wilk@oracle.com; Felipe Franciosi; axboe@fb.com; hch@infradead.org;
>> avanzini.arianna@gmail.com; Bob Liu
>> Subject: [RFC PATCH 00/10] Multi-queue support for xen-block driver
>>
>> This patchset convert the Xen PV block driver to the multi-queue block layer API
>> by sharing and using multiple I/O rings between the frontend and backend.
>>
>> History:
>> It's based on the result of Arianna's internship for GNOME's Outreach Program
>> for Women, in which she was mentored by Konrad Rzeszutek Wilk. I also
>> worked on this patchset with her at that time, and now fully take over this task.
>> I've got her authorization to "change authorship or SoB to the patches as you
>> like."
>>
>> A few words on block multi-queue layer:
>> Multi-queue block layer improved block scalability a lot by split single request
>> queue to per-processor software queues and hardware dispatch queues. The
>> linux blk-mq API will handle software queues, while specific block driver must
>> deal with hardware queues.
> 
> IIUC, the main motivation around the blk-mq work was around locking issues on a block device's request queue when accessed concurrently from different NUMA nodes. I believe we are not stressing enough on the main benefit of taking such approach on Xen.
> 
> Many modern storage systems (e.g. NVMe devices) will respond much better (especially when it comes to IOPS) to a high number of outstanding requests. That can be achieved by having a single thread sustaining a high IO depth _and/or_ several different threads issuing requests at the same time. The former approach is often limited by CPU capacity; that is, we can suffer from only being able to handle so many interrupts being delivered to the (v)CPU that the single thread is running on (also simply observable by 'top' showing the thread smoking at 100%). The latter approach is more flexible, given that many threads can run over several different (v)CPUs. I have a lot of data around this topic and am happy to share if people are interested.
> 
> We can therefore use the multi-queue block layer in a guest to have more than one request queue associated with block front. These can be mapped over several rings to the backend, making it very easy for us to run multiple threads on the backend for a single virtual disk. I believe this is why Bob is seeing massive improvements when running 'fio' in a guest with an increased number of jobs.
> 

Yes, exactly. I will add this information to the commit log.

Thanks,
-Bob

> In my opinion, this motivation should be highlighted behind the blk-mq adoption by Xen.
> 
> Thanks,
> Felipe
> 
>>
>> The xen/block implementation:
>> 1) Convert to blk-mq api with only one hardware queue.
>> 2) Use more rings to act as multi hardware queues.
>> 3) Negotiate number of hardware queues, the same as xen-net driver. The
>> backend notify "multi-queue-max-queues" to frontend, then the front write
>> back final number to "multi-queue-num-queues".
>>
>> Test result:
>> fio's IOmeter emulation on a 16 cpus domU with a null_blk device, hardware
>> queue number was 16.
>> nr_fio_jobs      IOPS(before)   IOPS(after)	  Diff
>> 	1                 57k             58k       0%
>> 	4                 95k 	         201k    +210%
>> 	8                 89k            372k    +410%
>>        16                 68k            284k    +410%
>>        32                 65k            196k    +300%
>>        64                 63k            183k    +290%
>>
>> More results are coming, there was also big improvement on both write-IOPS
>> and latency.
>>
>> Any comments or suggestions are welcome.
>> Thank you,
>> -Bob Liu
>>
>> Bob Liu (10):
>>   xen/blkfront: convert to blk-mq API
>>   xen/blkfront: drop legacy block layer support
>>   xen/blkfront: reorg info->io_lock after using blk-mq API
>>   xen/blkfront: separate ring information to an new struct
>>   xen/blkback: separate ring information out of struct xen_blkif
>>   xen/blkfront: pseudo support for multi hardware queues
>>   xen/blkback: pseudo support for multi hardware queues
>>   xen/blkfront: negotiate hardware queue number with backend
>>   xen/blkback: get hardware queue number from blkfront
>>   xen/blkfront: use work queue to fast blkif interrupt return
>>
>>  drivers/block/xen-blkback/blkback.c | 370 ++++++++-------  drivers/block/xen-
>> blkback/common.h  |  54 ++-  drivers/block/xen-blkback/xenbus.c  | 415
>> +++++++++++------
>>  drivers/block/xen-blkfront.c        | 894 +++++++++++++++++++++---------------
>>  4 files changed, 1018 insertions(+), 715 deletions(-)
>>
>> --
>> 1.8.3.1

  reply	other threads:[~2015-02-19  2:04 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-15  8:18 [RFC PATCH 00/10] Multi-queue support for xen-block driver Bob Liu
2015-02-15  8:18 ` Bob Liu
2015-02-15  8:18 ` [PATCH 01/10] xen/blkfront: convert to blk-mq API Bob Liu
2015-02-15  8:18   ` Bob Liu
2015-02-15  8:18 ` [PATCH 02/10] xen/blkfront: drop legacy block layer support Bob Liu
2015-02-18 17:02   ` Christoph Hellwig
2015-02-18 17:02   ` Christoph Hellwig
2015-02-15  8:18 ` Bob Liu
2015-02-15  8:18 ` [PATCH 03/10] xen/blkfront: reorg info->io_lock after using blk-mq API Bob Liu
2015-02-15  8:18   ` Bob Liu
2015-02-18 17:05   ` Christoph Hellwig
2015-02-19  2:07     ` Bob Liu
2015-02-19  2:07     ` Bob Liu
2015-02-18 17:05   ` Christoph Hellwig
2015-02-15  8:18 ` [PATCH 04/10] xen/blkfront: separate ring information to an new struct Bob Liu
2015-02-15  8:18 ` Bob Liu
2015-02-18 17:28   ` Roger Pau Monné
2015-02-18 17:37     ` Konrad Rzeszutek Wilk
2015-02-18 17:37     ` Konrad Rzeszutek Wilk
2015-02-18 18:08       ` Felipe Franciosi
2015-02-18 18:29         ` Konrad Rzeszutek Wilk
2015-02-18 18:29         ` Konrad Rzeszutek Wilk
2015-02-19  2:05         ` Bob Liu
2015-02-19  2:05         ` Bob Liu
2015-02-19 11:08           ` Roger Pau Monné
2015-02-19 11:08           ` Roger Pau Monné
2015-02-19 11:14             ` David Vrabel
2015-02-19 11:14             ` David Vrabel
2015-02-19 12:06               ` Felipe Franciosi
2015-02-19 13:12                 ` Roger Pau Monné
2015-02-19 13:12                 ` Roger Pau Monné
2015-02-20 18:59                   ` Konrad Rzeszutek Wilk
2015-02-20 18:59                   ` Konrad Rzeszutek Wilk
2015-02-27 12:52                     ` Bob Liu
2015-02-27 12:52                     ` Bob Liu
2015-03-04 21:21                       ` Konrad Rzeszutek Wilk
2015-03-04 21:21                       ` Konrad Rzeszutek Wilk
2015-03-05  0:47                         ` Bob Liu
2015-03-05  0:47                         ` Bob Liu
2015-03-06 10:30                           ` Felipe Franciosi
2015-03-06 10:30                           ` Felipe Franciosi
2015-03-17  7:00                             ` Bob Liu
2015-03-17  7:00                             ` Bob Liu
2015-03-17 14:52                               ` Felipe Franciosi
2015-03-17 14:52                               ` Felipe Franciosi
2015-03-18  0:52                                 ` Bob Liu
2015-03-18  0:52                                 ` Bob Liu
2015-02-19 12:06               ` Felipe Franciosi
2015-02-19 11:30             ` Malcolm Crossley
2015-02-18 18:08       ` Felipe Franciosi
2015-02-18 17:28   ` Roger Pau Monné
2015-02-15  8:19 ` [PATCH 05/10] xen/blkback: separate ring information out of struct xen_blkif Bob Liu
2015-02-15  8:19 ` Bob Liu
2015-02-15  8:19 ` [PATCH 06/10] xen/blkfront: pseudo support for multi hardware queues Bob Liu
2015-02-15  8:19 ` Bob Liu
2015-02-15  8:19 ` [PATCH 07/10] xen/blkback: " Bob Liu
2015-02-15  8:19 ` Bob Liu
2015-02-19 16:57   ` David Vrabel
2015-02-19 16:57   ` [Xen-devel] " David Vrabel
2015-02-15  8:19 ` [PATCH 08/10] xen/blkfront: negotiate hardware queue number with backend Bob Liu
2015-02-15  8:19 ` Bob Liu
2015-02-15  8:19 ` [PATCH 09/10] xen/blkback: get hardware queue number from blkfront Bob Liu
2015-02-15  8:19 ` Bob Liu
2015-02-15  8:19 ` [PATCH 10/10] xen/blkfront: use work queue to fast blkif interrupt return Bob Liu
2015-02-19 16:51   ` [Xen-devel] " David Vrabel
2015-02-19 16:51     ` David Vrabel
2015-02-15  8:19 ` Bob Liu
2015-02-18 17:01 ` [RFC PATCH 00/10] Multi-queue support for xen-block driver Christoph Hellwig
2015-02-18 17:01 ` Christoph Hellwig
2015-02-18 18:22 ` Felipe Franciosi
2015-02-18 18:22 ` Felipe Franciosi
2015-02-19  2:04   ` Bob Liu [this message]
2015-02-19  2:04   ` Bob Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='54E544BC.1090703__30748.5749166974$1424311666$gmane$org@oracle.com' \
    --to=bob.liu@oracle.com \
    --cc=avanzini.arianna@gmail.com \
    --cc=axboe@fb.com \
    --cc=david.vrabel@citrix.com \
    --cc=felipe.franciosi@citrix.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.