[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a99dnhyt.fsf@rustcorp.com.au>
Date: Mon, 16 Jun 2014 22:12:50 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: Ming Lei <ming.lei@...onical.com>, Jens Axboe <axboe@...nel.dk>,
linux-kernel@...r.kernel.org
Cc: linux-api@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
"Michael S. Tsirkin" <mst@...hat.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Ming Lei <ming.lei@...onical.com>
Subject: Re: [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ
Ming Lei <ming.lei@...onical.com> writes:
> 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@...onical.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));
Hmm, please pad this like so:
__u8 unused;
__u16 num_queues;
That avoids weird alignment.
Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists