linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	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
Date: Sat, 03 Oct 2015 07:55:23 +0800	[thread overview]
Message-ID: <560F196B.2090504@oracle.com> (raw)
In-Reply-To: <560EAF3E.4060500@citrix.com>


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 <bob.liu@oracle.com>
>>>
>>> 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 = "<ring-ref>"
>>>> + * /local/domain/1/device/vbd/0/queue-0/event-channel = "<evtchn>"
>>>> + * /local/domain/1/device/vbd/0/queue-1 = ""
>>>> + * /local/domain/1/device/vbd/0/queue-1/ring-ref = "<ring-ref>"
>>>> + * /local/domain/1/device/vbd/0/queue-1/event-channel = "<evtchn>"
>>>
>>> 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 = "<ring-ref0>"
> /local/domain/1/device/vbd/0/queue-0/ring-ref1 = "<ring-ref1>"
> /local/domain/1/device/vbd/0/queue-0/ring-ref2 = "<ring-ref2>"
> [...]
> 

True, and this is already supported. I'll update the document next version.

-- 
Regards,
-Bob

  reply	other threads:[~2015-10-02 23:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-05 12:39 [PATCH v3 0/9] xen-block: support multi hardware-queues/rings Bob Liu
2015-09-05 12:39 ` [PATCH v3 1/9] xen-blkfront: convert to blk-mq APIs Bob Liu
2015-09-23 20:31   ` Konrad Rzeszutek Wilk
2015-09-23 21:12     ` Konrad Rzeszutek Wilk
2015-09-05 12:39 ` [PATCH v3 2/9] xen-block: add document for mutli hardware queues/rings Bob Liu
2015-09-23 20:32   ` Konrad Rzeszutek Wilk
2015-10-02 16:04   ` Roger Pau Monné
2015-10-02 16:12     ` [Xen-devel] " Wei Liu
2015-10-02 16:22       ` Roger Pau Monné
2015-10-02 23:55         ` Bob Liu [this message]
2015-09-05 12:39 ` [PATCH v3 3/9] xen/blkfront: separate per ring information out of device info Bob Liu
2015-10-02 17:02   ` Roger Pau Monné
2015-10-03  0:34     ` Bob Liu
2015-10-05 15:17       ` Roger Pau Monné
2015-10-10  8:30     ` Bob Liu
2015-10-19  9:42       ` Roger Pau Monné
2015-09-05 12:39 ` [PATCH v3 4/9] xen/blkfront: pseudo support for multi hardware queues/rings Bob Liu
2015-10-05 10:52   ` Roger Pau Monné
2015-10-07 10:28     ` Bob Liu
2015-09-05 12:39 ` [PATCH v3 5/9] xen/blkfront: convert per device io_lock to per ring ring_lock Bob Liu
2015-10-05 14:13   ` Roger Pau Monné
2015-10-07 10:34     ` Bob Liu
2015-09-05 12:39 ` [PATCH v3 6/9] xen/blkfront: negotiate the number of hw queues/rings with backend Bob Liu
2015-10-05 14:40   ` Roger Pau Monné
2015-10-07 10:39     ` Bob Liu
2015-10-07 11:46       ` Roger Pau Monné
2015-10-07 12:19         ` Bob Liu
2015-09-05 12:39 ` [PATCH v3 7/9] xen/blkback: separate ring information out of struct xen_blkif Bob Liu
2015-10-05 14:55   ` Roger Pau Monné
2015-10-07 10:41     ` Bob Liu
2015-10-10  4:08     ` Bob Liu
2015-10-19  9:36       ` Roger Pau Monné
2015-10-19 10:03         ` Bob Liu
2015-10-05 14:55   ` Roger Pau Monné
2015-09-05 12:39 ` [PATCH v3 8/9] xen/blkback: pseudo support for multi hardware queues/rings Bob Liu
2015-10-05 15:08   ` Roger Pau Monné
2015-10-07 10:50     ` Bob Liu
2015-10-07 11:49       ` Roger Pau Monné
2015-09-05 12:39 ` [PATCH v3 9/9] xen/blkback: get number of hardware queues/rings from blkfront Bob Liu
2015-10-05 15:15   ` Roger Pau Monné
2015-10-07 10:54     ` Bob Liu
2015-10-02  9:57 ` [PATCH v3 0/9] xen-block: support multi hardware-queues/rings Rafal Mielniczuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=560F196B.2090504@oracle.com \
    --to=bob.liu@oracle.com \
    --cc=avanzini.arianna@gmail.com \
    --cc=axboe@fb.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=felipe.franciosi@citrix.com \
    --cc=hch@infradead.org \
    --cc=jonathan.davies@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafal.mielniczuk@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).