[PATCH 5/9] libnvme: add support for retrieving namespace gendisk I/O statistics
Nilay Shroff
nilay at linux.ibm.com
Tue Mar 24 06:12:48 PDT 2026
On 3/24/26 2:36 PM, Daniel Wagner wrote:
> On Sat, Mar 21, 2026 at 08:58:04PM +0530, Nilay Shroff wrote:
>> Gendisk I/O statistics provide useful insight into disk activity,
>> including read/write/discard/flush operations, as well as information
>> about in-flight I/Os and I/O timing.
>>
>> Parsing these statistics allows users to determine the number of I/Os
>> processed, time spent servicing I/O, number of sectors accessed, and
>> the count of in-flight requests.
>>
>> Add support for retrieving namespace gendisk I/O statistics. Also add
>> support for computing deltas of these statistics between samples, such
>> as I/O ticks, number of sectors, and number of serviced I/Os.
>>
>> These metrics can be used by tools such as nvme-top to display real-time
>> disk activity.
>
> Same comments as in the previous patch.
> - error codes
> - is it necessary to expose 'cur', 'this' via the API?
Yeah will use proper error codes.
The same rationale as in the previous patch applies here for exposing cur/this.
The only difference is that the earlier patch handled nvme_path_t statistics,
while this one operates on nvme_ns_t statistics.
Thanks,
--Nilay
More information about the Linux-nvme
mailing list