From: hch@lst.de (Christoph Hellwig)
Subject: nvme multipath support V2
Date: Mon, 18 Sep 2017 16:14:44 -0700 [thread overview]
Message-ID: <20170918231453.27128-1-hch@lst.de> (raw)
Hi all,
this series adds support for multipathing, that is accessing nvme
namespaces through multiple controllers to the nvme core driver.
It is a very thin and efficient implementation that relies on
close cooperation with other bits of the nvme driver, and few small
and simple block helpers.
Compared to dm-multipath the important differences are how management
of the paths is done, and how the I/O path works.
Management of the paths is fully integrated into the nvme driver,
for each newly found nvme controller we check if there are other
controllers that refer to the same subsystem, and if so we link them
up in the nvme driver. Then for each namespace found we check if
the namespace id and identifiers match to check if we have multiple
controllers that refer to the same namespaces. For now path
availability is based entirely on the controller status, which at
least for fabrics will be continuously updated based on the mandatory
keep alive timer. Once the Asynchronous Namespace Access (ANA)
proposal passes in NVMe we will also get per-namespace states in
addition to that, but for now any details of that remain confidential
to NVMe members.
The I/O path is very different from the existing multipath drivers,
which is enabled by the fact that NVMe (unlike SCSI) does not support
partial completions - a controller will either complete a whole
command or not, but never only complete parts of it. Because of that
there is no need to clone bios or requests - the I/O path simply
redirects the I/O to a suitable path. For successful commands
multipath is not in the completion stack at all. For failed commands
we decide if the error could be a path failure, and if yes remove
the bios from the request structure and requeue them before completing
the request. All together this means there is no performance
degradation compared to normal nvme operation when using the multipath
device node (at least not until I find a dual ported DRAM backed
device :))
There are a couple questions left in the individual patches, comments
welcome.
Note that this series requires the previous series to remove bi_bdev,
in doubt use the git tree below for testing.
A git tree is available at:
git://git.infradead.org/users/hch/block.git nvme-mpath
gitweb:
http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/nvme-mpath
Changes since V1:
- introduce new nvme_ns_ids structure to clean up identifier handling
- generic_make_request_fast is now named direct_make_request and calls
generic_make_request_checks
- reset bi_disk on resubmission
- create sysfs links between the existing nvme namespace block devices and
the new share mpath device
- temporarily added the timeout patches from James, this should go into
nvme-4.14, though
next reply other threads:[~2017-09-18 23:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 23:14 Christoph Hellwig [this message]
2017-09-18 23:14 ` [PATCH 1/9] nvme: allow timed-out ios to retry Christoph Hellwig
2017-09-18 23:14 ` [PATCH 2/9] block: move REQ_NOWAIT Christoph Hellwig
2017-09-18 23:14 ` [PATCH 3/9] block: add REQ_DRV bit Christoph Hellwig
2017-09-18 23:14 ` [PATCH 4/9] block: provide a direct_make_request helper Christoph Hellwig
2017-09-18 23:14 ` [PATCH 5/9] block: add a blk_steal_bios helper Christoph Hellwig
2017-09-18 23:14 ` [PATCH 6/9] nvme: track subsystems Christoph Hellwig
2017-09-21 22:52 ` Keith Busch
2017-09-18 23:14 ` [PATCH 7/9] nvme: introduce a nvme_ns_ids structure Christoph Hellwig
2017-09-20 8:27 ` Johannes Thumshirn
2017-09-18 23:14 ` [PATCH 8/9] nvme: track shared namespaces Christoph Hellwig
2017-09-20 8:36 ` Johannes Thumshirn
2017-09-20 14:54 ` Christoph Hellwig
2017-09-21 5:22 ` Johannes Thumshirn
2017-09-21 14:37 ` Christoph Hellwig
2017-09-21 15:16 ` Keith Busch
2017-09-24 15:25 ` Christoph Hellwig
2017-09-18 23:14 ` [PATCH 9/9] nvme: implement multipath access to nvme subsystems Christoph Hellwig
2017-09-20 0:18 ` Tony Yang
2017-09-20 8:15 ` Johannes Thumshirn
2017-09-20 9:42 ` Johannes Thumshirn
2017-09-20 22:58 ` Keith Busch
2017-09-20 23:52 ` Christoph Hellwig
2017-09-21 21:12 ` Keith Busch
2017-09-24 14:42 ` Christoph Hellwig
2017-09-22 15:09 ` Keith Busch
2017-09-24 14:48 ` Christoph Hellwig
2017-09-20 11:09 ` nvme multipath support V2 Johannes Thumshirn
2017-09-20 14:55 ` Christoph Hellwig
2017-09-21 5:23 ` Johannes Thumshirn
2017-09-21 14:50 ` Christoph Hellwig
2017-09-22 0:21 ` Tony Yang
2017-09-24 14:41 ` Christoph Hellwig
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=20170918231453.27128-1-hch@lst.de \
--to=hch@lst.de \
/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