From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v2] blkif.h: document blkif multi-queue/ring extension Date: Mon, 16 Nov 2015 14:14:52 -0500 Message-ID: <20151116191452.GA25675@char.us.oracle.com> References: <1446161067-24196-1-git-send-email-bob.liu@oracle.com> <20151103175842.GB28527@char.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZyPEz-0004TP-BO for xen-devel@lists.xenproject.org; Mon, 16 Nov 2015 19:15:01 +0000 Content-Disposition: inline In-Reply-To: <20151103175842.GB28527@char.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: bob.liu@oracle.com, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, jbeulich@suse.com, tim@xen.org Cc: xen-devel@lists.xenproject.org, david.vrabel@citrix.com, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, Nov 03, 2015 at 12:58:42PM -0500, Konrad Rzeszutek Wilk wrote: > On Fri, Oct 30, 2015 at 07:24:27AM +0800, Bob Liu wrote: > > Document the multi-queue/ring feature in terms of XenStore keys to be written > > by the backend and by the frontend. > > > > Signed-off-by: Bob Liu > > Reviewed-by: Konrad Rzeszutek Wilk xen]$ scripts/get_maintainer.pl -f `find . -name blkif.h` Ian Campbell Ian Jackson Jan Beulich Keir Fraser Tim Deegan xen-devel@lists.xen.org So adding those folks on the 'To:' list. > > -- > > v2: Comments from Konrad > > --- > > xen/include/public/io/blkif.h | 48 +++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 48 insertions(+) > > > > diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h > > index 8f0f9a6..fbc9ddb 100644 > > --- a/xen/include/public/io/blkif.h > > +++ b/xen/include/public/io/blkif.h > > @@ -394,6 +394,54 @@ > > */ > > > > /* > > + * 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" with 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-channel and 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 = "" > > + * > > + * It is also possible to use multiple queues/rings together with > > + * feature multi-page ring buffer. > > + * For example, a frontend requests two queues/rings and the size of each ring > > + * buffer is two pages must write the following set of related keys: > > + * > > + * /local/domain/1/device/vbd/0/multi-queue-num-queues = "2" > > + * /local/domain/1/device/vbd/0/ring-page-order = "1" > > + * /local/domain/1/device/vbd/0/queue-0 = "" > > + * /local/domain/1/device/vbd/0/queue-0/ring-ref0 = "" > > + * /local/domain/1/device/vbd/0/queue-0/ring-ref1 = "" > > + * /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-ref0 = "" > > + * /local/domain/1/device/vbd/0/queue-1/ring-ref1 = "" > > + * /local/domain/1/device/vbd/0/queue-1/event-channel = "" > > + * > > + */ > > + > > +/* > > * STATE DIAGRAMS > > * > > ***************************************************************************** > > -- > > 1.7.10.4 > >