From: Nilay Shroff <nilay@linux.ibm.com>
To: John Garry <john.g.garry@oracle.com>, linux-nvme@lists.infradead.org
Cc: hare@suse.de, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me,
dwagner@suse.de, kanie@linux.alibaba.com, jmeneghi@redhat.com,
randyj@purestorage.com, martin.petersen@oracle.com,
gjoyce@linux.ibm.com
Subject: Re: [PATCH v7 3/9] nvme-multipath: pass I/O type to nvme_find_path()
Date: Wed, 12 Aug 2026 13:35:35 +0530 [thread overview]
Message-ID: <1debeecf-672a-453d-b4d4-7f798045ae48@linux.ibm.com> (raw)
In-Reply-To: <70b23be2-0cb3-49fe-bff4-237082caaab3@oracle.com>
On 8/11/26 4:06 PM, John Garry wrote:
> On 10/08/2026 18:19, Nilay Shroff wrote:
>>> It's a but unfortunate that we have to find op_type even for when not using the latency iopolicy.
>>>
>> I looked at a few alternatives to avoid passing op_type into
>> nvme_find_path(), but couldn't find a cleaner approach.
>> Fortunately, determining op_type is inexpensive, so I don't
>> expect it to have any measurable performance impact.
>
> All I can think of is a variant of nvme_find_path() which accepts the bio, but that means more complication and code duplication - but not too much.
>
> As you mentioned, the processing should be small for this.
>
>>
>>>> if (likely(ns)) {
>>>> bio_set_dev(bio, ns->disk->part0);
>>>> /*
>>>> @@ -572,7 +573,7 @@ static int nvme_ns_head_get_unique_id(struct gendisk *disk, u8 id[16],
>>>> int srcu_idx, ret = -EWOULDBLOCK;
>>>> srcu_idx = srcu_read_lock(&head->srcu);
>>>> - ns = nvme_find_path(head);
>>>> + ns = nvme_find_path(head, NVME_STAT_OTHER);
>>>> if (ns)
>>>> ret = nvme_ns_get_unique_id(ns, id, type);
>>>> srcu_read_unlock(&head->srcu, srcu_idx);
>>>> @@ -588,7 +589,7 @@ static int nvme_ns_head_report_zones(struct gendisk *disk, sector_t sector,
>>>> int srcu_idx, ret = -EWOULDBLOCK;
>>>> srcu_idx = srcu_read_lock(&head->srcu);
>>>> - ns = nvme_find_path(head);
>>>> + ns = nvme_find_path(head, NVME_STAT_OTHER);
>>>> if (ns)
>>>> ret = nvme_ns_report_zones(ns, sector, nr_zones, args);
>>>> srcu_read_unlock(&head->srcu, srcu_idx);
>>>> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
>>>> index 824651cc898d..8a9ec502912d 100644
>>>> --- a/drivers/nvme/host/nvme.h
>>>> +++ b/drivers/nvme/host/nvme.h
>>>> @@ -520,6 +520,13 @@ struct nvme_ns_ids {
>>>> u8 csi;
>>>> };
>>>> +enum nvme_stat_group {
>>>> + NVME_STAT_READ,
>>>> + NVME_STAT_WRITE,
>>>> + NVME_STAT_OTHER,
>>>
>>> Would NVME_STAT_OTHER ever be used in high frequency scenarios such that it is worth having its own type? If not, could NVME_STAT_READ be reused?
>>>
>> It may not be used in high-throughput scenarios, but treating these
>> commands as READ or WRITE would unnecessarily skew the latency statistics
>> for actual read/write workloads. Keeping them in a separate category
>> avoids that distortion, so I think having NVME_STAT_OTHER makes sense.
>
> I can't imagine that NVME_STAT_OTHER could skew the READ/WRITE results too much, but I don't know the full range of IO for which NVME_STAT_OTHER would be used (so I may be wrong).
>
There're many opcodes which falls in other catogory here for instance,
flush/write-zeros/compare/verify/dsm and few others...
> BTW, it would be nice to mention the reason behind NVME_STAT_OTHER in the commit message. None of enum nvme_stat_group is described in much detail.
>
Yes make sense, I'd do the needful.
Thanks,
--Nilay
next prev parent reply other threads:[~2026-08-12 8:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-09 10:07 [PATCH v7 0/9] nvme-multipath: introduce latency I/O policy Nilay Shroff
2026-08-09 10:07 ` [PATCH v7 1/9] block: expose blk_stat_{enable,disable}_accounting() to drivers Nilay Shroff
2026-08-10 8:18 ` John Garry
2026-08-09 10:07 ` [PATCH v7 2/9] block: record I/O request start time for passthru request Nilay Shroff
2026-08-10 6:44 ` Hannes Reinecke
2026-08-09 10:07 ` [PATCH v7 3/9] nvme-multipath: pass I/O type to nvme_find_path() Nilay Shroff
2026-08-10 8:57 ` John Garry
2026-08-10 17:19 ` Nilay Shroff
2026-08-11 10:36 ` John Garry
2026-08-12 8:05 ` Nilay Shroff [this message]
2026-08-09 10:07 ` [PATCH v7 4/9] nvme-multipath: add support for latency I/O policy Nilay Shroff
2026-08-10 8:12 ` John Garry
2026-08-10 17:25 ` Nilay Shroff
2026-08-11 10:26 ` John Garry
2026-08-12 8:01 ` Nilay Shroff
2026-08-10 10:46 ` John Garry
2026-08-10 15:25 ` Nilay Shroff
2026-08-11 10:03 ` John Garry
2026-08-12 7:55 ` Nilay Shroff
2026-08-09 10:08 ` [PATCH v7 5/9] nvme: add generic debugfs support Nilay Shroff
2026-08-09 10:08 ` [PATCH v7 6/9] nvme-multipath: add debugfs attribute latency_ewma_shift Nilay Shroff
2026-08-09 10:08 ` [PATCH v7 7/9] nvme-multipath: add debugfs attribute latency_batch_timeout Nilay Shroff
2026-08-09 10:08 ` [PATCH v7 8/9] nvme-multipath: add debugfs attribute latency_stat Nilay Shroff
2026-08-09 10:08 ` [PATCH v7 9/9] nvme-multipath: add documentation for latency I/O policy Nilay Shroff
2026-08-10 6:45 ` Hannes Reinecke
2026-08-10 7:50 ` [PATCH v7 0/9] nvme-multipath: introduce " John Garry
2026-08-10 17:27 ` Nilay Shroff
2026-08-11 9:37 ` John Garry
2026-08-12 8:07 ` Nilay Shroff
2026-08-10 9:43 ` 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=1debeecf-672a-453d-b4d4-7f798045ae48@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=dwagner@suse.de \
--cc=gjoyce@linux.ibm.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jmeneghi@redhat.com \
--cc=john.g.garry@oracle.com \
--cc=kanie@linux.alibaba.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.petersen@oracle.com \
--cc=randyj@purestorage.com \
--cc=sagi@grimberg.me \
/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