[PATCHv5 1/2] block: accumulate memory segment gaps per bio

Martin K. Petersen martin.petersen at oracle.com
Tue Oct 14 14:18:15 PDT 2025


Keith,

> The blk-mq dma iterator has an optimization for requests that align to
> the device's iommu merge boundary. This boundary may be larger than
> the device's virtual boundary, but the code had been depending on that
> queue limit to know ahead of time if the request is guaranteed to
> align to that optimization.
>
> Rather than rely on that queue limit, which many devices may not
> report, save the lowest set bit of any boundary gap between each
> segment in the bio while checking the segments. The request stores the
> value for merging and quickly checking per io if the request can use
> iova optimizations.

Looks OK to me.

Reviewed-by: Martin K. Petersen <martin.petersen at oracle.com>

-- 
Martin K. Petersen



More information about the Linux-nvme mailing list