OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH] virtio-blk: document VIRTIO_BLK_F_MQ multiqueue feature


Linux 3.17 added the virtio-blk multiqueue feature to the virtio_blk
guest driver.  The feature was never formalized in the VIRTIO
specification.  Let's document it now.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 trunk/content.tex | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/trunk/content.tex b/trunk/content.tex
index d989d98..c8fd79c 100644
--- a/trunk/content.tex
+++ b/trunk/content.tex
@@ -4023,6 +4023,8 @@ device except where noted.
 \subsection{Virtqueues}\label{sec:Device Types / Block Device / Virtqueues}
 \begin{description}
 \item[0] requestq
+\item[\ldots]
+\item[N] requestqN
 \end{description}
 
 \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
@@ -4043,6 +4045,8 @@ device except where noted.
 
 \item[VIRTIO_BLK_F_TOPOLOGY (10)] Device exports information on optimal I/O
     alignment.
+
+\item[VIRTIO_BLK_F_MQ (12)] Number of virtqueues is in \field{num_queues}.
 \end{description}
 
 \subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Block Device / Feature bits / Legacy Interface: Feature bits}
@@ -4090,6 +4094,8 @@ struct virtio_blk_config {
                 le32 opt_io_size;
         } topology;
         u8 reserved;
+        u8 reserved2;
+        le16 num_queues;
 };
 \end{lstlisting}
 
@@ -4119,6 +4125,10 @@ according to the native endian of the guest rather than
   \field{topology} struct can be read to determine the physical block size and optimal
   I/O lengths for the driver to use. This also does not affect the units
   in the protocol, only performance.
+
+\item If the VIRTIO_BLK_F_MQ feature is negotiated, \field{num_queues} can be
+  read to determine the number of virtqueues.  There is always at least 1
+  virtqueue even if the feature is not negotiated.
 \end{enumerate}
 
 \subsubsection{Legacy Interface: Device Initialization}\label{sec:Device Types / Block Device / Device Initialization / Legacy Interface: Device Initialization}
@@ -4137,7 +4147,7 @@ after a driver announced lack of support for VIRTIO_BLK_F_FLUSH.
 
 \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Operation}
 
-The driver queues requests to the virtqueue, and they are used by
+The driver queues requests to a virtqueue, and they are used by
 the device (not necessarily in order). Each request is of form:
 
 \begin{lstlisting}
-- 
2.5.5



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]