All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@canonical.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	linux-api@vger.kernel.org,
	Linux Virtualization <virtualization@lists.linux-foundation.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
Date: Tue, 17 Jun 2014 23:50:57 +0800	[thread overview]
Message-ID: <CACVXFVO0SybUKArQbKkj2+hbk6q_gt3SBooNNmw1jErRR8d07A@mail.gmail.com> (raw)
In-Reply-To: <CAJSP0QWaS--gPZ=ONFrXby1DQLw4R0RCro7bpHCdmucyjmqT_w@mail.gmail.com>

On Tue, Jun 17, 2014 at 10:40 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Sat, Jun 14, 2014 at 1:29 AM, Ming Lei <ming.lei@canonical.com> wrote:
>> Firstly this patch supports more than one virtual queues for virtio-blk
>> device.
>>
>> Secondly this patch maps the virtual queue to blk-mq's hardware queue.
>>
>> With this approach, both scalability and performance problem can be improved.
>>
>> Signed-off-by: Ming Lei <ming.lei@canonical.com>
>> ---
>>  drivers/block/virtio_blk.c |   75 ++++++++++++++++++++++++++++++++------------
>>  1 file changed, 55 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
>> index f63d358..e0d077d 100644
>> --- a/drivers/block/virtio_blk.c
>> +++ b/drivers/block/virtio_blk.c
>> @@ -16,6 +16,8 @@
>>
>>  #define PART_BITS 4
>>
>> +#define MAX_NUM_VQ 16
>
> It would be nice to allocate virtqueues dynamically instead of
> hardcoding the limit.  virtio-scsi also allocates virtqueues
> dynamically.

virtio-scsi may have lots of LUN, but virtio-blk only has one disk
which needn't lots of hardware queues.

Also it doesn't matter since it isn't part of ABI.

If change on virtio_blk_config is agreed, both host side and
guest side can choose to support dynamic length or pre-defined
length freely.

Thanks,
--
Ming Lei

WARNING: multiple messages have this Message-ID (diff)
From: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
To: Stefan Hajnoczi <stefanha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Michael S. Tsirkin"
	<mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Virtualization
	<virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Stefan Hajnoczi
	<stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Paolo Bonzini <pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
Date: Tue, 17 Jun 2014 23:50:57 +0800	[thread overview]
Message-ID: <CACVXFVO0SybUKArQbKkj2+hbk6q_gt3SBooNNmw1jErRR8d07A@mail.gmail.com> (raw)
In-Reply-To: <CAJSP0QWaS--gPZ=ONFrXby1DQLw4R0RCro7bpHCdmucyjmqT_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Jun 17, 2014 at 10:40 AM, Stefan Hajnoczi <stefanha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Sat, Jun 14, 2014 at 1:29 AM, Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
>> Firstly this patch supports more than one virtual queues for virtio-blk
>> device.
>>
>> Secondly this patch maps the virtual queue to blk-mq's hardware queue.
>>
>> With this approach, both scalability and performance problem can be improved.
>>
>> Signed-off-by: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
>> ---
>>  drivers/block/virtio_blk.c |   75 ++++++++++++++++++++++++++++++++------------
>>  1 file changed, 55 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
>> index f63d358..e0d077d 100644
>> --- a/drivers/block/virtio_blk.c
>> +++ b/drivers/block/virtio_blk.c
>> @@ -16,6 +16,8 @@
>>
>>  #define PART_BITS 4
>>
>> +#define MAX_NUM_VQ 16
>
> It would be nice to allocate virtqueues dynamically instead of
> hardcoding the limit.  virtio-scsi also allocates virtqueues
> dynamically.

virtio-scsi may have lots of LUN, but virtio-blk only has one disk
which needn't lots of hardware queues.

Also it doesn't matter since it isn't part of ABI.

If change on virtio_blk_config is agreed, both host side and
guest side can choose to support dynamic length or pre-defined
length freely.

Thanks,
--
Ming Lei

  reply	other threads:[~2014-06-17 15:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 17:29 [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk Ming Lei
2014-06-13 17:29 ` Ming Lei
2014-06-13 17:29 ` [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ Ming Lei
2014-06-13 17:29   ` Ming Lei
2014-06-16 12:42   ` Rusty Russell
2014-06-16 12:42   ` Rusty Russell
2014-06-16 12:42     ` Rusty Russell
2014-06-13 17:29 ` [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device Ming Lei
2014-06-13 17:29   ` Ming Lei
2014-06-16 12:47   ` Rusty Russell
2014-06-16 12:47   ` Rusty Russell
2014-06-16 12:47     ` Rusty Russell
2014-06-17  2:40   ` Stefan Hajnoczi
2014-06-17  2:40     ` Stefan Hajnoczi
2014-06-17 15:50     ` Ming Lei [this message]
2014-06-17 15:50       ` Ming Lei
2014-06-17 15:53       ` Paolo Bonzini
2014-06-17 15:53         ` Paolo Bonzini
2014-06-17 16:00         ` Ming Lei
2014-06-17 16:00           ` Ming Lei
2014-06-17 16:34           ` Paolo Bonzini
2014-06-17 16:34             ` Paolo Bonzini
2014-06-18  4:04             ` Ming Lei
2014-06-18  4:04             ` Ming Lei
2014-06-18  4:04               ` Ming Lei
2015-12-14 10:31               ` Paolo Bonzini
2015-12-14 10:31               ` Paolo Bonzini
2015-12-14 10:31                 ` Paolo Bonzini
2015-12-15  1:26                 ` Ming Lei
2015-12-15  1:26                 ` Ming Lei
2015-12-15  1:26                   ` Ming Lei
2014-06-17 15:50     ` Ming Lei
2014-06-13 17:35 ` [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk Jens Axboe
2014-06-13 17:35   ` Jens Axboe

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=CACVXFVO0SybUKArQbKkj2+hbk6q_gt3SBooNNmw1jErRR8d07A@mail.gmail.com \
    --to=ming.lei@canonical.com \
    --cc=axboe@kernel.dk \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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.