Skip to content

Commit

Permalink
include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ
Browse files Browse the repository at this point in the history
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:

	- bad scalability
	- bad throughput

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 <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Ming Lei authored and axboe committed Jul 1, 2014
1 parent d151561 commit cb55321
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/uapi/linux/virtio_blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -77,6 +78,10 @@ struct virtio_blk_config {

/* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
__u8 wce;
__u8 unused;

/* number of vqs, only available when VIRTIO_BLK_F_MQ is set */
__u16 num_queues;
} __attribute__((packed));

/*
Expand Down

0 comments on commit cb55321

Please sign in to comment.