public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: linux-nvme@lists.infradead.org, hare@suse.com, kbusch@kernel.org,
	hch@lst.de, gjoyce@ibm.com, wenxiong@linux.ibm.com
Subject: Re: [PATCH 6/9] libnvme: add support for per-path diagnostic counters
Date: Tue, 24 Mar 2026 19:24:11 +0530	[thread overview]
Message-ID: <afc7e386-e474-4ba4-8e3f-b710eee781f2@linux.ibm.com> (raw)
In-Reply-To: <8b123263-297b-43bb-b9ea-272a9dd419c5@flourine.local>

On 3/24/26 2:48 PM, Daniel Wagner wrote:
> On Sat, Mar 21, 2026 at 08:58:05PM +0530, Nilay Shroff wrote:
>> Add support for retrieving per-path diagnostic counters such as
>> command_retry_count, command_error_count, and multipath_failover_count.
>> These counters improve visibility into NVMe native multipath behavior
>> and can be useful for tools such as nvme-top to display real-time
>> statistics.
>>
>> Unlike other sysfs attributes, these counters can change dynamically.
>> Annotate them with "!accessors:none" and provide custom implementations
>> to always retrieve the latest (non-cached) values.
> 
> If I got this right, this and the next patches depend on
> 
>     https://lore.kernel.org/all/20260220175024.292898-1-nilay@linux.ibm.com
> 
Yes you're correct, I am just waiting for Keith's response on that thread here:
https://lore.kernel.org/all/0832f4dd-0ab6-4e11-a404-fdb18ca699b2@linux.ibm.com/

> Should we wait with interfaces here until they are ready? As we
> currently still in the development phase of nvme-cli 3 and thus the API
> is not stable, we can touch it again. In the past we also added support
> for kernel feature which weren't there yet. I don't mind too much, just
> asking what would be best here.
> 

I’m fine either way regarding when to introduce these interfaces.
Even if we include the diagnostic counter patches now, it won’t break
anything. If the corresponding sysfs attributes are not present, the
library will simply return 0 for those counters.

There are essentially two options,

1. Include the diagnostic counter patches now:
    In this case, nvme-cli/nvme-top can start using the libnvme APIs immediately.
    If the kernel does not yet expose these attributes, the counters will appear
    as zero in the dashboard. Once the kernel support lands, the correct values
    will automatically be reflected without requiring further changes to libnvme
    or nvme-cli (unless the sysfs layout changes).

2. Defer the diagnostic counter patches:
    In this case, the counters would be omitted from the nvme-top dashboard for now.
    Once kernel support is available, we would need to update nvme-top (and libnvme)
    to add them.

Given these options, I would lean towards option (1), but I’m happy to go with
your preference.

> The whole series looks pretty good, just my nitpicks and the question
> on exposing 'cur'/'this'.

I will address nitpick comments in next patchset, and I have provided the rationale
about why we need to expose 'cur'/'this' in an earlier reply.

Thanks,
--Nilay



  reply	other threads:[~2026-03-24 13:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21 15:27 [PATCH 0/9] libnvme: add support for retrieving additional NVMe stat Nilay Shroff
2026-03-21 15:28 ` [PATCH 1/9] libnvme: annotate nvme_path::ana_state with !accessors:none Nilay Shroff
2026-03-24  8:55   ` Daniel Wagner
2026-03-24 13:08     ` Nilay Shroff
2026-03-21 15:28 ` [PATCH 2/9] libnvme: annotate nvme_path::numa_nodes " Nilay Shroff
2026-03-21 15:28 ` [PATCH 3/9] libnvme: annotate nvme_subsystem::iopolicy " Nilay Shroff
2026-03-21 15:28 ` [PATCH 4/9] libnvme: add support for retrieving per-path gendisk I/O statistics Nilay Shroff
2026-03-24  9:05   ` Daniel Wagner
2026-03-24 13:02     ` Nilay Shroff
2026-04-01 15:42       ` Daniel Wagner
2026-04-03 15:36         ` Nilay Shroff
2026-03-21 15:28 ` [PATCH 5/9] libnvme: add support for retrieving namespace " Nilay Shroff
2026-03-24  9:06   ` Daniel Wagner
2026-03-24 13:12     ` Nilay Shroff
2026-03-21 15:28 ` [PATCH 6/9] libnvme: add support for per-path diagnostic counters Nilay Shroff
2026-03-24  9:18   ` Daniel Wagner
2026-03-24 13:54     ` Nilay Shroff [this message]
2026-04-01 15:54       ` Daniel Wagner
2026-04-03 15:47         ` Nilay Shroff
2026-03-21 15:28 ` [PATCH 7/9] libnvme: add support for namespace " Nilay Shroff
2026-03-21 15:28 ` [PATCH 8/9] libnvme: add support for nshead " Nilay Shroff
2026-03-21 15:28 ` [PATCH 9/9] libnvme: add support for ctrl " Nilay Shroff

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=afc7e386-e474-4ba4-8e3f-b710eee781f2@linux.ibm.com \
    --to=nilay@linux.ibm.com \
    --cc=dwagner@suse.de \
    --cc=gjoyce@ibm.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=wenxiong@linux.ibm.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