Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Nilay Shroff <nilay@linux.ibm.com>,
	Daniel Wagner <dwagner@suse.de>, Hannes Reinecke <hare@suse.de>
Cc: linux-nvme@lists.infradead.org
Subject: [PATCH] nvme: document the per-path multipath sysfs attributes
Date: Fri,  4 Dec 2026 14:25:30 +0800	[thread overview]
Message-ID: <20261204062530.3499466-1-kanie@linux.alibaba.com> (raw)

nvme-multipath.rst documents how to set the iopolicy but does not
mention the per-path sysfs attributes that observe the result of the
path selection: numa_nodes for the numa policy, queue_depth for the
queue-depth policy, and path_state, which is available regardless of
the configured policy. Document all three, following the same style
used for the per-path attributes of the queue-depth policy in
Documentation/ABI/stable/sysfs-nvme.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 Documentation/admin-guide/nvme-multipath.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/admin-guide/nvme-multipath.rst b/Documentation/admin-guide/nvme-multipath.rst
index 058894187cbb..113666226680 100644
--- a/Documentation/admin-guide/nvme-multipath.rst
+++ b/Documentation/admin-guide/nvme-multipath.rst
@@ -56,6 +56,13 @@ The list of policies supported by the kernel can be read from the read-only
 Discovery subsystems have no I/O paths and report "none" for both attributes;
 writing to their "iopolicy" attribute is not supported.
 
+The state of a path can be monitored regardless of the configured policy
+through the read-only "path_state" attribute of the path device
+(/sys/block/nvmeXcYnZ/path_state): "enabled" if the path is usable for I/O,
+or "ctrl-down", "ana-pending" or "ns-not-ready" if the path is disabled
+because its controller is not live, an ANA state change is pending, or the
+namespace is not ready.
+
 
 NUMA
 ----
@@ -64,6 +71,10 @@ The NUMA policy selects the path closest to the NUMA node of the current CPU for
 I/O distribution. This policy maintains the nearest paths to each NUMA node
 based on network interface connections.
 
+Each path shows the NUMA nodes for which it is the currently selected path in
+the read-only "numa_nodes" attribute (/sys/block/nvmeXcYnZ/numa_nodes), e.g.
+"0-1,3". It returns empty while the subsystem's iopolicy is not "numa".
+
 When to use the NUMA policy:
   1. Multi-core Systems: Optimizes memory access in multi-core and
      multi-processor systems, especially under NUMA architecture.
@@ -91,6 +102,10 @@ Queue-Depth
 The queue-depth policy manages I/O requests based on the current queue depth
 of each path, selecting the path with the least number of in-flight I/Os.
 
+Each path shows the number of I/Os currently in flight on its controller in
+the read-only "queue_depth" attribute (/sys/block/nvmeXcYnZ/queue_depth). It
+returns empty while the subsystem's iopolicy is not "queue-depth".
+
 When to use the queue-depth policy:
   1. High load with small I/Os: Effectively balances load across paths when
      the load is high, and I/O operations consist of small, relatively
-- 
2.43.7



             reply	other threads:[~2026-12-04  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  6:25 Guixin Liu [this message]
2026-12-04  8:20 ` [PATCH] nvme: document the per-path multipath sysfs attributes 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=20261204062530.3499466-1-kanie@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=axboe@kernel.dk \
    --cc=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nilay@linux.ibm.com \
    --cc=sagi@grimberg.me \
    /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