[PATCH v8 24/24] nvme-pci: optimize single-segment handling
Kanchan Joshi
joshiiitr at gmail.com
Fri Apr 18 05:32:08 PDT 2025
> > + if (nr_segments == 1 && (iod->flags & IOD_SINGLE_SEGMENT)) {
>
> nvme_pci_setup_prps() calls nvme_try_setup_prp_simple() which sets
> IOD_SINGLE_SEGMENT if and only if the req has a single phys segment. So why do
> you need to count the segments again here ? Looking at the flag only should be
> enough, no ?
Yes, the flag will be enough.
I started with nr_segments first, but felt the need of a flag when I
reached to handle the unmap part.
This can be changed if the series requires an iteration.
Or I can do this as part of the cleanup which I anyway need to do to
replace the "iod->aborted" field with a flag.
--
Kanchan
More information about the Linux-nvme
mailing list