From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751544AbbJBX4S (ORCPT ); Fri, 2 Oct 2015 19:56:18 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:17066 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbbJBX4Q (ORCPT ); Fri, 2 Oct 2015 19:56:16 -0400 Message-ID: <560F196B.2090504@oracle.com> Date: Sat, 03 Oct 2015 07:55:23 +0800 From: Bob Liu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: =?windows-1252?Q?Roger_Pau_Monn=E9?= CC: Wei Liu , xen-devel@lists.xen.org, hch@infradead.org, felipe.franciosi@citrix.com, rafal.mielniczuk@citrix.com, linux-kernel@vger.kernel.org, jonathan.davies@citrix.com, axboe@fb.com, david.vrabel@citrix.com, avanzini.arianna@gmail.com, boris.ostrovsky@oracle.com Subject: Re: [Xen-devel] [PATCH v3 2/9] xen-block: add document for mutli hardware queues/rings References: <1441456782-31318-1-git-send-email-bob.liu@oracle.com> <1441456782-31318-3-git-send-email-bob.liu@oracle.com> <560EAB13.10305@citrix.com> <20151002161233.GA2941@zion.uk.xensource.com> <560EAF3E.4060500@citrix.com> In-Reply-To: <560EAF3E.4060500@citrix.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/03/2015 12:22 AM, Roger Pau Monné wrote: > El 02/10/15 a les 18.12, Wei Liu ha escrit: >> On Fri, Oct 02, 2015 at 06:04:35PM +0200, Roger Pau Monné wrote: >>> El 05/09/15 a les 14.39, Bob Liu ha escrit: >>>> Document multi queues/rings of xen-block. >>>> >>>> Signed-off-by: Bob Liu >>> >>> As said by Konrad, you should send this against the Xen public headers >>> also (or even before). I have a comment below. >>> Sure, I'll do that and also rebase this series after get more comments. >>>> --- >>>> 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 = "" >>> >>> AFAICT, it's impossible by design to use multiple queues together with >>> multipage rings, is that right? >>> >> >> As far as I can tell, these two features are not inherently coupled. >> Whether you want to make (by design) them coupled together or not is >> another matter. :-) > > I haven't looked at the implementation yet, but some mention of whether > multipage-rings are allowed with multiqueue would be good. For example > if both can indeed be used in conjunction I would mention: > > If multi-page rings are also used, the format of the grant references > will be: > > /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/ring-ref2 = "" > [...] > True, and this is already supported. I'll update the document next version. -- Regards, -Bob