Re: [PATCH] nvme: adjust multiples of NVME_CTRL_PAGE_SIZE in offset

From: Keith Busch
Date: Fri May 24 2024 - 12:02:00 EST


On Thu, May 23, 2024 at 05:01:49PM +0530, Kundan Kumar wrote:
> bio_vec start offset may be relatively large particularly when large
> folio gets added to the bio. A bigger offset will result in avoiding the
> single-segment mapping optimization and end up using expensive
> mempool_alloc further.
>
> Rather than using absolute value, adjust bv_offset by
> NVME_CTRL_PAGE_SIZE while checking if segment can be fitted into one/two
> PRP entries.

Thanks, applied to nvme-6.10.