[PATCH RFC 0/1] Add visibility for native NVMe miltipath using debugfs

Nilay Shroff nilay at linux.ibm.com
Sun Jul 28 21:50:45 PDT 2024



On 7/29/24 02:17, Sagi Grimberg wrote:
> 
>> # cat /sys/kernel/debug/block/nvme2n2/multipath
>> io-policy: numa
>> io-path:
>> --------
>> node  current-path  ctrl    ana-state
>> 2     nvme2c2n2     nvme2   optimized
>> 3     nvme2c0n2     nvme0   optimized
>>
>> The above output shows that current selected iopolicy is numa. And when we
>> have workload running I/O on numa node 2, accessing namespace "nvme2n2",
>> it uses path nvme2c2n2 and controller nvme2 for forwarding data. Moreover
>> the current ana-state for this path is optimized. Similarly, for I/O
>> workload running on numa node 3 would use path nvme2c0n2 and controller
>> nvme0.
>>
>> Now changing the iopolicy to round-robin,
>>
>> # echo "round-robin" > /sys/class/nvme-subsystem/nvme-subsys2/iopolicy
>>
>> # cat /sys/kernel/debug/block/nvme2n2/multipath
>> io-policy: round-robin
>> io-path:
>> --------
>> node  rr-path       ctrl    ana-state
>> 2     nvme2c2n2     nvme2   optimized
>> 2     nvme2c0n2     nvme0   optimized
>> 3     nvme2c2n2     nvme2   optimized
>> 3     nvme2c0n2     nvme0   optimized
> 
> Can we avoid a formatted output in sysfs? I'd much rather prefer that nvme-cli/libnvme to
> format this (maybe this may be wanted as json in the future for example)...
> 
> Can we simply expose the individual components and have userpace format the output?

Yes that's what I am planning to implement. The sysfs would only expose the relevant 
information from NVMe driver  and then libnvme/nvme-cli format the sysfs output as needed.

Thanks,
--Nilay



More information about the Linux-nvme mailing list