[PATCH 7/9] nvme-pci: convert the data mapping blk_rq_dma_map
Daniel Gomez
da.gomez at kernel.org
Tue Jun 17 10:45:10 PDT 2025
On 17/06/2025 19.43, Daniel Gomez wrote:
> On 12/06/2025 07.02, Christoph Hellwig wrote:
>> On Wed, Jun 11, 2025 at 02:15:10PM +0200, Daniel Gomez wrote:
>>>> #define NVME_MAX_SEGS \
>>>> - min(NVME_CTRL_PAGE_SIZE / sizeof(struct nvme_sgl_desc), \
>>>> - (PAGE_SIZE / sizeof(struct scatterlist)))
>>>> + (NVME_CTRL_PAGE_SIZE / sizeof(struct nvme_sgl_desc))
>>>
>>> The 8 MiB max transfer size is only reachable if host segments are at least 32k.
>>> But I think this limitation is only on the SGL side, right?
>>
>> Yes, PRPs don't really have the concept of segments to start with.
>
> SGLs don't have the same MPS limitation we have in PRPs. So I think the correct
> calculation for NVME_MAX_SEGS is PAGE_SIZE / sizeof(struct nvme_sgl_desc).
>
Please, ignore. I forgot I already made this point.
More information about the Linux-nvme
mailing list