Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: linux-nvme@lists.infradead.org
Subject: Re: [PATCHv3 2/4] nvme: extend show-topology command to add support for multipath
Date: Mon, 8 Sep 2025 14:53:28 +0200	[thread overview]
Message-ID: <8ca7b858-2ab7-49e1-830d-522947b11b54@suse.de> (raw)
In-Reply-To: <20250904175654.1183750-3-nilay@linux.ibm.com>

On 9/4/25 19:56, Nilay Shroff wrote:
> This commit enhances the show-topology command by adding support for
> NVMe multipath. With this change, users can now list all paths to a
> namespace from its corresponding head node device. Each NVMe path
> entry then also includes additional details such as ANA state, NUMA
> node, and queue depth, improving visibility into multipath configs.
> This information can be particularly helpful for debugging and
> analyzing NVMe multipath setups.
> 
> To support this functionality, the "--ranking" option of the nvme
> show-topology command has been extended with a new sub-option:
> "multipath".
> 
> Since this enhancement is specific to NVMe multipath, the iopolicy
> configured under each subsystem is now always displayed. Previously,
> iopolicy was shown only with nvme show-topology verbose output, but
> it is now included by default to improve usability and provide better
> context when reviewing multipath configurations via show-topology.
> 
> With this update, users can view the multipath topology of a multi
> controller/port NVMe disk.
> 
> Examples:
> 
> $ nvme show-topology -r multipath
> 
> nvme-subsys2 - NQN=nvmet_subsystem
>                 hostnqn=nqn.2014-08.org.nvmexpress:uuid:12b49f6e-0276-4746-b10c-56815b7e6dc2
>                 iopolicy=numa
> 
>            _ _ _<head-node>
>           /              _ _ _ <ana-state>
>          /              /      _ _ _ <numa-node-list>
>         /              /      /
>        |              /      /
>   +- nvme2n1 (ns 1)  /      /
>   \                 |      |
>    +- nvme2c2n1 optimized 1,2 nvme2 tcp traddr=127.0.0.2,trsvcid=4460,src_addr=127.0.0.1 live
>    +- nvme2c3n1 optimized 3,4 nvme3 tcp traddr=127.0.0.3,trsvcid=4460,src_addr=127.0.0.1 live
> 
> For iopolicy=numa, only NUMA node list is shown (queue depth is hidden).
> 
> $ nvme show-topology -r multipath
> 
> nvme-subsys2 - NQN=nvmet_subsystem
>                 hostnqn=nqn.2014-08.org.nvmexpress:uuid:12b49f6e-0276-4746-b10c-56815b7e6dc2
>                 iopolicy=queue-depth
> 
>            _ _ _<head-node>
>           /              _ _ _ <ana-state>
>          /              /
>         /              /     _ _ _<queue-depth>
>        |              /     /
>   +- nvme2n1 (ns 1)  /     /
>   \                 |     |
>    +- nvme2c2n1 optimized 0 nvme2 tcp traddr=127.0.0.2,trsvcid=4460,src_addr=127.0.0.1 live
>    +- nvme2c3n1 optimized 0 nvme3 tcp traddr=127.0.0.3,trsvcid=4460,src_addr=127.0.0.1 live
> 
> For iopolicy=queue-depth, queue depth is shown (NUMA node list is hidden).
> 
> $ nvme show-topology -r multipath
> 
> nvme-subsys2 - NQN=nvmet_subsystem
>                 hostnqn=nqn.2014-08.org.nvmexpress:uuid:12b49f6e-0276-4746-b10c-56815b7e6dc2
>                 iopolicy=round-robin
> 
>            _ _ _<head-node>
>           /              _ _ _ <ana-state>
>          /              /
>         /              /
>        |              /
>   +- nvme2n1 (ns 1)  /
>   \                 |
>    +- nvme2c2n1 optimized nvme2 tcp traddr=127.0.0.2,trsvcid=4460,src_addr=127.0.0.1 live
>    +- nvme2c3n1 optimized nvme3 tcp traddr=127.0.0.3,trsvcid=4460,src_addr=127.0.0.1 live
> 
> For iopolicy=round-robin, both NUMA node list and queue depth are hidden.
> 
> Note:
> The annotations above (e.g., <numa-node-list>, <ana-state>, <head-node>,
> <queue-depth>) are for illustration only and are not part of the actual
> command output. A more human-friendly tabular format will be introduced
> in a follow-up patches.
> 
> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
>   nvme-print-binary.c |  1 +
>   nvme-print-json.c   | 36 +++++++++++++++----
>   nvme-print-stdout.c | 85 ++++++++++++++++++++++++++++++++++++++++++---
>   nvme-print.c        |  4 ++-
>   nvme-print.h        |  1 +
>   nvme.c              |  4 ++-
>   nvme.h              |  1 +
>   7 files changed, 120 insertions(+), 12 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich


  reply	other threads:[~2025-09-08 17:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 17:56 [PATCHv3 0/4] nvme-cli: enhance the visibility of multipath using show-topology command Nilay Shroff
2025-09-04 17:56 ` [PATCHv3 1/4] nvme: support <device> option in " Nilay Shroff
2025-09-04 17:56 ` [PATCHv3 2/4] nvme: extend show-topology command to add support for multipath Nilay Shroff
2025-09-08 12:53   ` Hannes Reinecke [this message]
2025-09-04 17:56 ` [PATCHv3 3/4] nvme: add common APIs for printing tabular format output Nilay Shroff
2025-09-04 17:56 ` [PATCHv3 4/4] nvme: add support for printing show-topology in tabular form Nilay Shroff
2025-09-21 12:11 ` [PATCHv3 0/4] nvme-cli: enhance the visibility of multipath using show-topology command Nilay Shroff
2025-09-22  9:41   ` Daniel Wagner

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=8ca7b858-2ab7-49e1-830d-522947b11b54@suse.de \
    --to=hare@suse.de \
    --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