[PATCH] nvme: only use power of two io boundaries

Keith Busch kbusch at kernel.org
Thu Aug 27 11:04:39 EDT 2020


On Thu, Aug 27, 2020 at 09:46:12AM +0200, Christoph Hellwig wrote:
> On Tue, Aug 25, 2020 at 09:35:16AM -0700, Keith Busch wrote:
> > The kernel requires a power of two for boundaries because that's the
> > only way it can efficiently split commands that cross them. A
> > controller, however, may report a non-power of two boundary.
> > 
> > The driver had been rounding the controller's value to one the kernel
> > can use, but splitting on the wrong boundary provides no benefit on the
> > device side, and actually incurs additional submission overhead from
> > non-optimal splits. Don't provide any boundary hint if the controller's
> > value can't be used.
> 
> Shouldn't we log a warning about non-power of two sizes?

Sure, this would provide an explanation for unexpectedly lower
performance. That's worthy of a warning, so sending a v2.



More information about the Linux-nvme mailing list