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

Martin K. Petersen
2025-10-14T21:18:35Z

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@oracle.com>

--
Martin K. Petersen