From: Sagi Grimberg <sagi@grimberg.me>
To: linux-nvme@lists.infradead.org
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Keith Busch <kbusch@kernel.org>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
Hannes Reinecke <hare@suse.de>,
linux-block@vger.kernel.org
Subject: [PATCH v2 0/2] nvme-mpath: Add IO stats support
Date: Mon, 3 Oct 2022 12:43:42 +0300 [thread overview]
Message-ID: <20221003094344.242593-1-sagi@grimberg.me> (raw)
I've been hearing complaints about the fact that the nvme mpath stack
device does not expose IO stats just like any normal block device,
instead people need to check the bottom namespaces hidden devices,
mapping back to the mpath device node.
This really sucks, especially for observability hooks/plugins that
I've seen people do.
This series make the nvme mpath device expose normal IO stats. Given
that nvme-mpath doesn't have any context after submitting the bio, we
use the core completion path to start/end stats accounting on its
behalf, a similar practice that we use for other multipath related stuff.
While we are "double" accounting every request, this is a preferable
approach as opposed to try and locally collect/combine accurate stats
from multiple bottom hidden devices in the driver, or teach the block
layer to do so.
Local tests with null-blk + nvme-loop did not show any noticeable
performance degradation (within 1%).
Feedback is welcome.
Changes from v1:
- split into 2 patches, one prep and second is nvme-mpath stats
- fix possible use-after-free when ending request and accounting mpath io
stats
- mark REQ_NVME_MPATH_IO_STATS to allow user to disable stats on the mpath
device (also in the middle of a request).
Sagi Grimberg (2):
nvme: introduce nvme_start_request
nvme: support io stats on the mpath device
drivers/nvme/host/apple.c | 2 +-
drivers/nvme/host/core.c | 10 ++++++++++
drivers/nvme/host/fc.c | 2 +-
drivers/nvme/host/multipath.c | 25 +++++++++++++++++++++++++
drivers/nvme/host/nvme.h | 13 +++++++++++++
drivers/nvme/host/pci.c | 2 +-
drivers/nvme/host/rdma.c | 2 +-
drivers/nvme/host/tcp.c | 2 +-
drivers/nvme/target/loop.c | 2 +-
9 files changed, 54 insertions(+), 6 deletions(-)
--
2.34.1
next reply other threads:[~2022-10-03 9:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 9:43 Sagi Grimberg [this message]
2022-10-03 9:43 ` [PATCH v2 1/2] nvme: introduce nvme_start_request Sagi Grimberg
2022-10-04 6:09 ` Hannes Reinecke
2022-11-29 14:28 ` Keith Busch
2022-11-29 14:32 ` Jens Axboe
2022-11-29 14:31 ` Jens Axboe
2022-10-03 9:43 ` [PATCH v2 2/2] nvme: support io stats on the mpath device Sagi Grimberg
2022-10-04 6:11 ` Hannes Reinecke
2022-10-04 8:19 ` Sagi Grimberg
2022-11-29 14:33 ` Jens Axboe
2022-11-29 14:33 ` Jens Axboe
2022-11-29 14:42 ` Keith Busch
2022-11-29 14:45 ` [PATCH v2 0/2] nvme-mpath: Add IO stats support Christoph Hellwig
2022-11-29 16:43 ` Keith Busch
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=20221003094344.242593-1-sagi@grimberg.me \
--to=sagi@grimberg.me \
--cc=Chaitanya.Kulkarni@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.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