From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755670AbbIWVFX (ORCPT ); Wed, 23 Sep 2015 17:05:23 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:29309 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755573AbbIWVFV (ORCPT ); Wed, 23 Sep 2015 17:05:21 -0400 Date: Wed, 23 Sep 2015 16:32:41 -0400 From: Konrad Rzeszutek Wilk To: Bob Liu Cc: xen-devel@lists.xen.org, david.vrabel@citrix.com, linux-kernel@vger.kernel.org, roger.pau@citrix.com, felipe.franciosi@citrix.com, axboe@fb.com, hch@infradead.org, avanzini.arianna@gmail.com, rafal.mielniczuk@citrix.com, boris.ostrovsky@oracle.com, jonathan.davies@citrix.com Subject: Re: [PATCH v3 2/9] xen-block: add document for mutli hardware queues/rings Message-ID: <20150923203241.GB30295@l.oracle.com> References: <1441456782-31318-1-git-send-email-bob.liu@oracle.com> <1441456782-31318-3-git-send-email-bob.liu@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441456782-31318-3-git-send-email-bob.liu@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2015 at 08:39:35PM +0800, Bob Liu wrote: > Document multi queues/rings of xen-block. This needs to be posted on Xen devel as well so that the blkif.h header in Xen has this. > > Signed-off-by: Bob Liu > --- > include/xen/interface/io/blkif.h | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h > index c33e1c4..b453b70 100644 > --- a/include/xen/interface/io/blkif.h > +++ b/include/xen/interface/io/blkif.h > @@ -28,6 +28,38 @@ typedef uint16_t blkif_vdev_t; > typedef uint64_t blkif_sector_t; > > /* > + * Multiple hardware queues/rings: > + * If supported, the backend will write the key "multi-queue-max-queues" to > + * the directory for that vbd, and set its value to the maximum supported > + * number of queues. > + * Frontends that are aware of this feature and wish to use it can write the > + * key "multi-queue-num-queues", set to the number they wish to use, which > + * must be greater than zero, and no more than the value reported by the backend > + * in "multi-queue-max-queues". > + * > + * For frontends requesting just one queue, the usual event-channel and > + * ring-ref keys are written as before, simplifying the backend processing > + * to avoid distinguishing between a frontend that doesn't understand the > + * multi-queue feature, and one that does, but requested only one queue. > + * > + * Frontends requesting two or more queues must not write the toplevel > + * event-channeland ring-ref keys, instead writing those keys under sub-keys > + * having the name "queue-N" where N is the integer ID of the queue/ring for > + * which those keys belong. Queues are indexed from zero. > + * For example, a frontend with two queues must write the following set of > + * queue-related keys: > + * > + * /local/domain/1/device/vbd/0/multi-queue-num-queues = "2" > + * /local/domain/1/device/vbd/0/queue-0 = "" > + * /local/domain/1/device/vbd/0/queue-0/ring-ref = "" > + * /local/domain/1/device/vbd/0/queue-0/event-channel = "" > + * /local/domain/1/device/vbd/0/queue-1 = "" > + * /local/domain/1/device/vbd/0/queue-1/ring-ref = "" > + * /local/domain/1/device/vbd/0/queue-1/event-channel = "" > + * > + */ > + > +/* > * REQUEST CODES. > */ > #define BLKIF_OP_READ 0 > -- > 1.7.10.4 >