All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-comment] [PATCH v2] block: Add multiqueue
@ 2019-09-23 16:14 Eugenio Pérez
  2019-10-09 17:29 ` Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: Eugenio Pérez @ 2019-09-23 16:14 UTC (permalink / raw)
  To: virtio-comment

The spec miss that field. Add the field, some description around.

I've followed the network device's multiqueue mentions, and copied /
adapted when needed.

v2: Delete implementation detail about CPUs used.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 content.tex | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/content.tex b/content.tex
index 37a2190..da53922 100644
--- a/content.tex
+++ b/content.tex
@@ -3822,7 +3822,7 @@ \section{Block Device}\label{sec:Device Types / Block Device}
 
 The virtio block device is a simple virtual block device (ie.
 disk). Read and write requests (and other exotic requests) are
-placed in the queue, and serviced (probably out of order) by the
+placed in one of its queues, and serviced (probably out of order) by the
 device except where noted.
 
 \subsection{Device ID}\label{sec:Device Types / Block Device / Device ID}
@@ -3830,9 +3830,14 @@ \subsection{Device ID}\label{sec:Device Types / Block Device / Device ID}
 
 \subsection{Virtqueues}\label{sec:Device Types / Block Device / Virtqueues}
 \begin{description}
-\item[0] requestq
+\item[0] requestq1
+\item[\ldots]
+\item[N] requestqN
 \end{description}
 
+ N=1 if VIRTIO_BLK_F_MQ is not negotiated, otherwise N is set by
+ \field{num_queues}.
+
 \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
 
 \begin{description}
@@ -3857,6 +3862,8 @@ \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
 \item[VIRTIO_BLK_F_CONFIG_WCE (11)] Device can toggle its cache between writeback
     and writethrough modes.
 
+\item[VIRTIO_BLK_F_MQ (12)] Device supports multiqueue.
+
 \item[VIRTIO_BLK_F_DISCARD (13)] Device can support discard command, maximum
     discard sectors size in \field{max_discard_sectors} and maximum discard
     segment number in \field{max_discard_seg}.
@@ -3885,6 +3892,9 @@ \subsection{Device configuration layout}\label{sec:Device Types / Block Device /
 present. The availability of the others all depend on various feature
 bits as indicated above.
 
+The field \field{num_queues} only exists if VIRTIO_BLK_F_MQ is set. This field specifies
+the number of queues.
+
 The parameters in the configuration space of the device \field{max_discard_sectors}
 \field{discard_sector_alignment} are expressed in 512-byte units if the
 VIRTIO_BLK_F_DISCARD feature bit is negotiated. The \field{max_write_zeroes_sectors}
@@ -3913,7 +3923,8 @@ \subsection{Device configuration layout}\label{sec:Device Types / Block Device /
                 le32 opt_io_size;
         } topology;
         u8 writeback;
-        u8 unused0[3];
+        u8 unused0;
+        u16 num_queues;
         le32 max_discard_sectors;
         le32 max_discard_seg;
         le32 discard_sector_alignment;
@@ -3973,6 +3984,10 @@ \subsection{Device Initialization}\label{sec:Device Types / Block Device / Devic
     \field{max_write_zeroes_sectors} and \field{max_write_zeroes_seg} can
     be read to determine the maximum write zeroes sectors and maximum
     number of write zeroes segments for the block driver to use.
+
+\item If the VIRTIO_BLK_F_MQ feature is negotiated, \field{num_queues} field
+    can be read to determine the number of queues.
+
 \end{enumerate}
 
 \drivernormative{\subsubsection}{Device Initialization}{Device Types / Block Device / Device Initialization}
@@ -4024,7 +4039,7 @@ \subsubsection{Legacy Interface: Device Initialization}\label{sec:Device Types /
 
 \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 the virtqueues, and they are used by
 the device (not necessarily in order). Each request is of form:
 
 \begin{lstlisting}
-- 
2.16.5


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [virtio-comment] [PATCH v2] block: Add multiqueue
  2019-09-23 16:14 [virtio-comment] [PATCH v2] block: Add multiqueue Eugenio Pérez
@ 2019-10-09 17:29 ` Stefan Hajnoczi
  2019-10-10  8:28   ` Eugenio Perez Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2019-10-09 17:29 UTC (permalink / raw)
  To: Eugenio Pérez; +Cc: virtio-comment

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

On Mon, Sep 23, 2019 at 06:14:14PM +0200, Eugenio Pérez wrote:
> The spec miss that field. Add the field, some description around.
> 
> I've followed the network device's multiqueue mentions, and copied /
> adapted when needed.
> 
> v2: Delete implementation detail about CPUs used.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
>  content.tex | 23 +++++++++++++++++++----
>  1 file changed, 19 insertions(+), 4 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

Please create a GitHub Issue proposing a vote for this patch:
https://github.com/oasis-tcs/virtio-spec/issues/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [virtio-comment] [PATCH v2] block: Add multiqueue
  2019-10-09 17:29 ` Stefan Hajnoczi
@ 2019-10-10  8:28   ` Eugenio Perez Martin
  2019-10-11  8:19     ` Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: Eugenio Perez Martin @ 2019-10-10  8:28 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: virtio-comment

Github issue created:

https://github.com/oasis-tcs/virtio-spec/issues/50

Thanks!

On Wed, Oct 9, 2019 at 7:29 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> On Mon, Sep 23, 2019 at 06:14:14PM +0200, Eugenio Pérez wrote:
> > The spec miss that field. Add the field, some description around.
> >
> > I've followed the network device's multiqueue mentions, and copied /
> > adapted when needed.
> >
> > v2: Delete implementation detail about CPUs used.
> >
> > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > ---
> >  content.tex | 23 +++++++++++++++++++----
> >  1 file changed, 19 insertions(+), 4 deletions(-)
>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
>
> Please create a GitHub Issue proposing a vote for this patch:
> https://github.com/oasis-tcs/virtio-spec/issues/

This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [virtio-comment] [PATCH v2] block: Add multiqueue
  2019-10-10  8:28   ` Eugenio Perez Martin
@ 2019-10-11  8:19     ` Stefan Hajnoczi
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2019-10-11  8:19 UTC (permalink / raw)
  To: Eugenio Perez Martin; +Cc: virtio-comment, Michael S. Tsirkin

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On Thu, Oct 10, 2019 at 10:28:20AM +0200, Eugenio Perez Martin wrote:
> Github issue created:
> 
> https://github.com/oasis-tcs/virtio-spec/issues/50

Michael: I think this issue is ready for a ballot.

Stefan

> 
> Thanks!
> 
> On Wed, Oct 9, 2019 at 7:29 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > On Mon, Sep 23, 2019 at 06:14:14PM +0200, Eugenio Pérez wrote:
> > > The spec miss that field. Add the field, some description around.
> > >
> > > I've followed the network device's multiqueue mentions, and copied /
> > > adapted when needed.
> > >
> > > v2: Delete implementation detail about CPUs used.
> > >
> > > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > > ---
> > >  content.tex | 23 +++++++++++++++++++----
> > >  1 file changed, 19 insertions(+), 4 deletions(-)
> >
> > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> >
> > Please create a GitHub Issue proposing a vote for this patch:
> > https://github.com/oasis-tcs/virtio-spec/issues/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-11  8:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 16:14 [virtio-comment] [PATCH v2] block: Add multiqueue Eugenio Pérez
2019-10-09 17:29 ` Stefan Hajnoczi
2019-10-10  8:28   ` Eugenio Perez Martin
2019-10-11  8:19     ` Stefan Hajnoczi

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.