linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@canonical.com>
To: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	linux-api@vger.kernel.org, Ming Lei <ming.lei@canonical.com>,
	virtualization@lists.linux-foundation.org,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ
Date: Sat, 14 Jun 2014 01:29:21 +0800	[thread overview]
Message-ID: <1402680562-8328-2-git-send-email-ming.lei@canonical.com> (raw)
In-Reply-To: <1402680562-8328-1-git-send-email-ming.lei@canonical.com>

Current virtio-blk spec only supports one virtual queue for transfering
data between VM and host, and inside VM all kinds of operations on
the virtual queue needs to hold one lock, so cause below problems:

	- no scalability
    - bad throughput

So this patch requests to introduce feature of VIRTIO_BLK_F_MQ
so that more than one virtual queues can be used to virtio-blk
device, then above problems can be solved or eased.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 include/uapi/linux/virtio_blk.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h
index 6d8e61c..c5a2751 100644
--- a/include/uapi/linux/virtio_blk.h
+++ b/include/uapi/linux/virtio_blk.h
@@ -40,6 +40,7 @@
 #define VIRTIO_BLK_F_WCE	9	/* Writeback mode enabled after reset */
 #define VIRTIO_BLK_F_TOPOLOGY	10	/* Topology information is available */
 #define VIRTIO_BLK_F_CONFIG_WCE	11	/* Writeback mode available in config */
+#define VIRTIO_BLK_F_MQ		12	/* support more than one vq */
 
 #ifndef __KERNEL__
 /* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
@@ -77,6 +78,9 @@ struct virtio_blk_config {
 
 	/* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
 	__u8 wce;
+
+	/* number of vqs, only available when VIRTIO_BLK_F_MQ is set */
+	__u16 num_queues;
 } __attribute__((packed));
 
 /*
-- 
1.7.9.5

  reply	other threads:[~2014-06-13 17:29 UTC|newest]

Thread overview: 14+ 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 [this message]
     [not found]   ` <1402680562-8328-2-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-16 12:42     ` [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ Rusty Russell
2014-06-13 17:29 ` [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device Ming Lei
     [not found]   ` <1402680562-8328-3-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-16 12:47     ` Rusty Russell
2014-06-17  2:40   ` Stefan Hajnoczi
     [not found]     ` <CAJSP0QWaS--gPZ=ONFrXby1DQLw4R0RCro7bpHCdmucyjmqT_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-17 15:50       ` Ming Lei
2014-06-17 15:53         ` Paolo Bonzini
2014-06-17 16:00           ` Ming Lei
2014-06-17 16:34             ` Paolo Bonzini
     [not found]               ` <53A06E05.9060708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-18  4:04                 ` Ming Lei
     [not found]                   ` <CACVXFVMkV5R5GUjM7Y-U54SA-ENZZ26dbbv4K2_OYPdmmiuUqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-14 10:31                     ` Paolo Bonzini
     [not found]                       ` <566E9A7E.3030203-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-12-15  1:26                         ` Ming Lei
2014-06-13 17:35 ` [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk 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=1402680562-8328-2-git-send-email-ming.lei@canonical.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@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).