SGL support of driver

Keith Busch keith.busch at intel.com
Wed Jul 29 07:28:52 PDT 2015


On Wed, 29 Jul 2015, Christoph Hellwig wrote:
> 64k page size, 4k file system block size, raid 0 with a stripe size of
> 8k and two legs.
>
> The typical SGL feds to the hardware driver for streaming I/O will be:
>
> page A, offset 0, len 8k
> page A, offset 16k, len 8k
> page A, offset 32k, len 8k
> page A, offset 48k, len 8k
> page B, offset 0, len 8k

I think we can easily optimize for this. It would work w/ PRP if the
device's page size is set to <= 8k, which I believe all nvme controllers
support. We just need to make a small change to bvec_gap_to_prev()
to use the device's page size instead of PAGE_SIZE.

> This is clearly something PRP list will not handle well.  Note that I'm
> not nessecarily saying this is soemthing to optimize for, the more
> interesting case for NVMe really is the vectored direct I/O case.

Vectored direct never split when the block size >= page size.

512b sectors is still common in NVMe though, so yeah, those may need
separate req's.



More information about the Linux-nvme mailing list