[RFC PATCH 3/5] nvme-multipath: add sysfs attribute for adaptive I/O policy
Nilay Shroff
nilay at linux.ibm.com
Mon Sep 22 20:53:30 PDT 2025
On 9/22/25 1:05 PM, Hannes Reinecke wrote:
> On 9/21/25 13:12, Nilay Shroff wrote:
>> This commit introduces a new sysfs attribute, "adp_stat", under the
>> nvme path block device. This attribute provides visibility into the
>> state of the adaptive I/O policy and is intended to aid debugging and
>> observability. We now also calculate the per-path aggregated smoothed
>> (EWMA) latency for reporting it under this new attribute.
>>
>> The attribute reports per-path aggregated statistics, including I/O
>> weight, smoothed (EWMA) latency, selection count, processed samples,
>> and ignored samples.
>>
>> Signed-off-by: Nilay Shroff <nilay at linux.ibm.com>
>> ---
>> drivers/nvme/host/multipath.c | 77 ++++++++++++++++++++++++++++++++++-
>> drivers/nvme/host/nvme.h | 2 +
>> drivers/nvme/host/sysfs.c | 5 +++
>> 3 files changed, 82 insertions(+), 2 deletions(-)
>>
> Wouldn't this be better off if situated in the debugfs directly?
> Exposing the stats is not really crucial to operations, and mainly
> for debugging purposes only.
>
> Exposing the weight from the EWMA algorithm, OTOH, really does influence
> the performance, and might be an idea to expose.
>
Yes I think exposing this under debugfs is good idea.
Maybe we could also expose per-cpu stat under debugfs.
Thanks,
--Nilay
More information about the Linux-nvme
mailing list