[PATCH 3/8] nvme-pci: refactor nvme_pci_use_sgls
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Jun 24 21:28:09 PDT 2025
Christoph,
On 6/24/25 05:46, Christoph Hellwig wrote:
> On Mon, Jun 23, 2025 at 09:27:30AM -0600, Keith Busch wrote:
>>> - if (nvme_pci_use_sgls(dev, req, iod->sgt.nents))
>>> + if (use_sgl == SGL_FORCED ||
>>> + (use_sgl == SGL_SUPPORTED &&
>>> + (!sgl_threshold || nvme_pci_avg_seg_size(req) >= sgl_threshold)))
>>> ret = nvme_pci_setup_sgls(nvmeq, req, &cmnd->rw);
>> We historically interpreted sgl_threshold set to 0 to mean disable SGL
>> usage, maybe because the controller is broken or something. It might be
>> okay to have 0 mean to not consider segment sizes, but I just wanted to
>> point out this is a different interpretation of the user parameter.
> This is still a leftover from the threshold mess in the first version.
> I'll fix it for the next one.
Are you planning to send a V3 with a fix sg_threshold parameter ?
or
you are planning to send out a separate patch to fix this change
in the behavior ?
-ck
More information about the Linux-nvme
mailing list