Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Nilay Shroff <nilay@linux.ibm.com>,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Daniel Wagner <dwagner@suse.de>,
	John Garry <john.g.garry@oracle.com>,
	Hannes Reinecke <hare@suse.de>
Cc: linux-nvme@lists.infradead.org, xlpang@linux.alibaba.com,
	oliver.yang@linux.alibaba.com
Subject: Re: [PATCH v2 1/3] nvme: add ABI documentation for host sysfs interfaces
Date: Fri, 3 Jul 2026 10:09:13 +0800	[thread overview]
Message-ID: <87d3a982-3208-40b3-beed-d31b7ea9aa58@linux.alibaba.com> (raw)
In-Reply-To: <7d312569-a32d-4e08-bdfa-febb1389b83c@linux.ibm.com>



在 2026/7/2 21:49, Nilay Shroff 写道:
> On 7/2/26 3:25 PM, Guixin Liu wrote:
>> +What: /sys/block/nvmeXnY/diag/command_retries_count
>> +What:        /sys/block/nvmeXnY/diag/command_error_count
>> +What:        /sys/block/nvmeXnY/diag/multipath_failover_count
>> +What: /sys/block/nvmeXnY/diag/io_requeue_no_usable_path_count
>> +What: /sys/block/nvmeXnY/diag/io_fail_no_available_path_count
>> +Date:        May 2026
>> +KernelVersion:    7.2
>> +Contact:    Nilay Shroff<nilay@linux.ibm.com>
>> +Description:
>> +        Namespace diagnostic counters.
>> +
>> +        command_retries_count: I/O command retry counter. Only
>> +        visible on per-path devices.
>> +
>> +        command_error_count: I/O command error counter. Only
>> +        visible on per-path devices.
>> +
>> +        multipath_failover_count: Multipath failover counter.
>> +        Only visible on per-path devices. Requires
>> +        CONFIG_NVME_MULTIPATH.
>> +
>> +        io_requeue_no_usable_path_count: Counter of I/Os requeued
>> +        because no usable path was available. Only visible on
>> +        multipath head devices. Requires CONFIG_NVME_MULTIPATH.
>> +
>> +        io_fail_no_available_path_count: Counter of I/Os failed
>> +        because no available path existed. Only visible on
>> +        multipath head devices. Requires CONFIG_NVME_MULTIPATH.
>> +
>> +        All counters can be reset by writing a value.
>> +
>
> How about splitting the above diagnostic counters into two sections 
> instead? Since the sysfs
> layout differs depending on whether multipath is enabled, I think 
> documenting them separately
> may make the interface clearer.
>
> For instance, how about documenting it as follows:
>
> One block covering non-multipath configurations:
>
> What:           /sys/block/nvmeXnY/diag/command_retries_count
> What:           /sys/block/nvmeXnY/diag/command_error_count
>
> Description:
>         Namespace diagnostic counters for non-multipath
>         configurations (when CONFIG_NVME_MULTIPATH is
>         not configured).
>
>         command_retries_count: I/O command retry counter.
>
>         command_error_count: I/O command error counter.
>
>         All counters can be reset by writing any value.
>
> For multipath configurations:
>
> What:           /sys/block/nvmeXcYnZ/diag/command_retries_count
> What:           /sys/block/nvmeXcYnZ/diag/command_error_count
> What: /sys/block/nvmeXcYnZ/diag/multipath_failover_count
> What: /sys/block/nvmeXnY/diag/io_requeue_no_usable_path_count
> What: /sys/block/nvmeXnY/diag/io_fail_no_available_path_count
>
> Description:
>         Namespace diagnostic counters for multipath
>         configurations (when CONFIG_NVME_MULTIPATH is
>         configured).
>
>         command_retries_count: I/O command retry counter.
>
>         command_error_count: I/O command error counter.
>
>         multipath_failover_count: Multipath failover counter.
>
>         io_requeue_no_usable_path_count: Counter of I/Os
>         requeued because no usable path was available.
>
>         io_fail_no_available_path_count: Counter of I/Os
>         failed because no available path existed.
>
>         All counters can be reset by writing any value.
>
> I think this better reflects the actual sysfs interface and makes it 
> immediately obvious where each
> attribute is exposed, without having to describe the differences 
> between per-path and multipath head
> devices in the individual attribute descriptions.
>
Sure, changed in v3 thanks.
> One other suggestion: could we keep all of the diagnostic counters 
> grouped together in the ABI
> documentation? I noticed that in your first revision they were all 
> documented together, but in
> this revision they're separated. I'm referring to the controller 
> diagnostic counters under:
> /sys/class/nvme/nvmeX/diag/*
>
> IMO, keeping all of the diagnostic counters adjacent would make the 
> documentation easier to
> browse.
My bad, changed in v3 thanks.

Best Regards,
Guixin Liu
>
> And yes thanks for documenting all this!
>
> --Nilay



  reply	other threads:[~2026-07-03  2:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02  9:55 [PATCH v2 0/3] nvme: add ABI documentation for sysfs and configfs interfaces Guixin Liu
2026-07-02  9:55 ` [PATCH v2 1/3] nvme: add ABI documentation for host sysfs interfaces Guixin Liu
2026-07-02 13:49   ` Nilay Shroff
2026-07-03  2:09     ` Guixin Liu [this message]
2026-07-03  6:32   ` Hannes Reinecke
2026-07-02  9:55 ` [PATCH v2 2/3] nvmet: add ABI documentation for target configfs interfaces Guixin Liu
2026-07-03  6:34   ` Hannes Reinecke
2026-07-02  9:55 ` [PATCH v2 3/3] MAINTAINERS: add missing NVMe documentation files Guixin Liu

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=87d3a982-3208-40b3-beed-d31b7ea9aa58@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=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nilay@linux.ibm.com \
    --cc=oliver.yang@linux.alibaba.com \
    --cc=sagi@grimberg.me \
    --cc=xlpang@linux.alibaba.com \
    /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