linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Support SQ flow control disabled mode (TP 8005)
@ 2018-10-03  8:13 Sagi Grimberg
  2018-10-03  8:13 ` [PATCH v2 1/4] nvmet: support fabrics sq flow control Sagi Grimberg
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Sagi Grimberg @ 2018-10-03  8:13 UTC (permalink / raw)


Technical proposal 8005 adds a mode where sq head pointer updates can be
omitted based on the controller capability. When a host connects to
a controller it can request it to turn off SQ flow control (e.g. omit
sq head pointer updates). If the controller supports it, it returns
0xffff sq_head in the connect capsule response cqe.

Supporting this mode in nvmet means we can skip an atomic update in
the data path so we don't mind. Note that the host side still ignores
sq head pointer updates and flow controls based on completion accounting
alone. This TP at least gives us a mode that it is compliant.

When a controller implementation comes along that relies on sq head pointer
updates to flow control the host, we will probably need to address that, but
until then, we can start by micro-optimizing nvmet.

nvmet also exposes this capability in transport requirement field in the
discovery lof entry for host implementations that may want to talk to a
controller based on this capability, we use it to have our host to connect
with sq flow control disabled if the controller supports it, otherwise the
host connects normally as its doing today.

A nvme-cli patch is also attached sent together with the series.

Changes from v1:
- changed define names (disable_sqflow) as hannes suggested
- changed the mode to not be used by default and keep the existing
  behavior, the host will only try to disable sq flow control when
  userspace asked it to.
- added nvme-cli patch that adds --disable-sqflow if the controller
  exposes support.

Sagi Grimberg (4):
  nvmet: support fabrics sq flow control
  nvmet: don't override treq upon modification.
  nvmet: expose support for fabrics SQ flow control disable in treq
  nvme: disable fabrics SQ flow control when asked by the user

 drivers/nvme/host/fabrics.c       | 13 ++++++++++++
 drivers/nvme/host/fabrics.h       |  2 ++
 drivers/nvme/target/configfs.c    | 11 ++++++----
 drivers/nvme/target/core.c        | 34 ++++++++++++++++++++-----------
 drivers/nvme/target/fabrics-cmd.c |  8 +++++++-
 drivers/nvme/target/nvmet.h       |  3 ++-
 include/linux/nvme.h              | 11 +++++++---
 7 files changed, 61 insertions(+), 21 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-11-14 16:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-03  8:13 [PATCH v2 0/4] Support SQ flow control disabled mode (TP 8005) Sagi Grimberg
2018-10-03  8:13 ` [PATCH v2 1/4] nvmet: support fabrics sq flow control Sagi Grimberg
2018-11-14 14:19   ` Christoph Hellwig
2018-11-14 16:29     ` Sagi Grimberg
2018-10-03  8:13 ` [PATCH v2 2/4] nvmet: don't override treq upon modification Sagi Grimberg
2018-11-14 14:20   ` Christoph Hellwig
2018-11-14 16:30     ` Sagi Grimberg
2018-10-03  8:13 ` [PATCH v2 3/4] nvmet: expose support for fabrics SQ flow control disable in treq Sagi Grimberg
2018-10-03  8:13 ` [PATCH v2 4/4] nvme: disable fabrics SQ flow control when asked by the user Sagi Grimberg
2018-10-03  8:41   ` Hannes Reinecke
2018-11-14 14:21   ` Christoph Hellwig
2018-11-14 16:32     ` Sagi Grimberg
2018-10-03  8:13 ` [PATCH 5/4 nvme-cli] fabrics: support fabrics sq flow control disable Sagi Grimberg
2018-10-16  1:06 ` [PATCH v2 0/4] Support SQ flow control disabled mode (TP 8005) Sagi Grimberg
2018-10-31  5:03 ` Sagi Grimberg

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).