All of lore.kernel.org
 help / color / mirror / Atom feed
From: mlevitsk@redhat.com (Maxim Levitsky)
Subject: [PATCH] nvme: determine the number of IO queues
Date: Wed, 17 Apr 2019 20:33:36 +0300	[thread overview]
Message-ID: <096935354b16662eb481aeda1f48001ba489463c.camel@redhat.com> (raw)
In-Reply-To: <a2f0a97e14b884dc1183db9cbdd6f4b520000ce3.camel@redhat.com>

On Wed, 2019-04-17@20:32 +0300, Maxim Levitsky wrote:
> On Wed, 2019-04-17@22:12 +0800, Aaron Ma wrote:
> > Some controllers support limited IO queues, when over set
> > the number, it will return invalid field error.
> > Then NVME will be removed by driver.
> > 
> > Find the max number of IO queues that controller supports.
> > When it still got invalid result, set 1 IO queue at least to
> > bring NVME online.
> 
> To be honest a spec compliant device should not need this.
> The spec states:
> 
> "Number of I/O Completion Queues Requested (NCQR): Indicates the number of I/O
> Completion
> Queues requested by software. This number does not include the Admin
> Completion
> Queue. A
> minimum of one queue shall be requested, reflecting that the minimum support
> is
> for one I/O
> Completion Queue. This is a 0?s based value. The maximum value that may be
> specified is 65,534
> (i.e., 65,535 I/O Completion Queues). If the value specified is 65,535, the
> controller should return
> an error of Invalid Field in Command."
> 
> 
> This implies that you can ask for any value and the controller must not
> respond
> with an error, but rather indicate how many queues it supports.
> 
> Maybe its better to add a quirk for the broken device, which needs this?

I forgot to add the relevant paragraph:

"Note: The value allocated may be smaller or larger than the number of queues
requested, often in virtualized
implementations. The controller may not have as many queues to allocate as are
requested. Alternatively,
the controller may have an allocation unit of queues (e.g. power of two) and may
supply more queues to
host software to satisfy its allocation unit."


Best regards,
	Maxim Levitsky

WARNING: multiple messages have this Message-ID (diff)
From: Maxim Levitsky <mlevitsk@redhat.com>
To: Aaron Ma <aaron.ma@canonical.com>,
	linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
	keith.busch@intel.com, axboe@fb.com
Subject: Re: [PATCH] nvme: determine the number of IO queues
Date: Wed, 17 Apr 2019 20:33:36 +0300	[thread overview]
Message-ID: <096935354b16662eb481aeda1f48001ba489463c.camel@redhat.com> (raw)
In-Reply-To: <a2f0a97e14b884dc1183db9cbdd6f4b520000ce3.camel@redhat.com>

On Wed, 2019-04-17 at 20:32 +0300, Maxim Levitsky wrote:
> On Wed, 2019-04-17 at 22:12 +0800, Aaron Ma wrote:
> > Some controllers support limited IO queues, when over set
> > the number, it will return invalid field error.
> > Then NVME will be removed by driver.
> > 
> > Find the max number of IO queues that controller supports.
> > When it still got invalid result, set 1 IO queue at least to
> > bring NVME online.
> 
> To be honest a spec compliant device should not need this.
> The spec states:
> 
> "Number of I/O Completion Queues Requested (NCQR): Indicates the number of I/O
> Completion
> Queues requested by software. This number does not include the Admin
> Completion
> Queue. A
> minimum of one queue shall be requested, reflecting that the minimum support
> is
> for one I/O
> Completion Queue. This is a 0’s based value. The maximum value that may be
> specified is 65,534
> (i.e., 65,535 I/O Completion Queues). If the value specified is 65,535, the
> controller should return
> an error of Invalid Field in Command."
> 
> 
> This implies that you can ask for any value and the controller must not
> respond
> with an error, but rather indicate how many queues it supports.
> 
> Maybe its better to add a quirk for the broken device, which needs this?

I forgot to add the relevant paragraph:

"Note: The value allocated may be smaller or larger than the number of queues
requested, often in virtualized
implementations. The controller may not have as many queues to allocate as are
requested. Alternatively,
the controller may have an allocation unit of queues (e.g. power of two) and may
supply more queues to
host software to satisfy its allocation unit."


Best regards,
	Maxim Levitsky


  reply	other threads:[~2019-04-17 17:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 14:12 [PATCH] nvme: determine the number of IO queues Aaron Ma
2019-04-17 14:12 ` Aaron Ma
2019-04-17 17:32 ` Maxim Levitsky
2019-04-17 17:32   ` Maxim Levitsky
2019-04-17 17:33   ` Maxim Levitsky [this message]
2019-04-17 17:33     ` Maxim Levitsky
2019-04-18  6:21     ` Aaron Ma
2019-04-18  6:21       ` Aaron Ma
2019-04-18  7:25       ` Maxim Levitsky
2019-04-18  7:25         ` Maxim Levitsky
2019-04-18 12:13       ` Minwoo Im
2019-04-18 12:13         ` Minwoo Im
2019-04-18 12:52         ` Aaron Ma
2019-04-18 12:52           ` Aaron Ma
2019-04-18 13:33           ` Minwoo Im
2019-04-18 13:33             ` Minwoo Im
2019-04-18 13:38             ` Aaron Ma
2019-04-18 13:38               ` Aaron Ma
2019-04-18 13:58               ` Minwoo Im
2019-04-18 13:58                 ` Minwoo Im
2019-04-18 13:48       ` Keith Busch
2019-04-18 13:48         ` Keith Busch
2019-04-18 14:21         ` Aaron Ma
2019-04-18 14:21           ` Aaron Ma
2019-04-25 14:39           ` Christoph Hellwig
2019-04-25 14:39             ` Christoph Hellwig
2019-04-26  5:27             ` Aaron Ma
2019-04-26  5:27               ` Aaron Ma
2019-04-17 21:30 ` Edmund Nadolski (Microsoft)
2019-04-17 21:30   ` Edmund Nadolski (Microsoft)
2019-04-18  6:24   ` Aaron Ma
2019-04-18  6:24     ` Aaron Ma

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=096935354b16662eb481aeda1f48001ba489463c.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    /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 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.