Bug report - drivers/nvme/host/pci.c?

Keith Busch keith.busch at intel.com
Wed Jan 3 12:11:31 PST 2018


On Wed, Jan 03, 2018 at 01:01:41PM -0700, Keith Busch wrote:
> On Wed, Jan 03, 2018 at 07:46:05PM +0000, Chaitanya Kulkarni wrote:
> >    HI Fangjian,
> > 
> >    I ran your test on the latest kernel and I did not see the problem.
> <> 
> >    Is there a particular reason why you are using Linux version 4.15.0-rc1?
> > 
> >    Can you please check if you are having the same problem on the latest
> >    kernel as mentioned in my log?
> > 
> >    Regards,
> > 
> >    Chaitanya
> 
> I would guess the reporter has an IOMMU enabled that DMA maps into fewer
> entries than the virtual table has. Since that's possible, I think the
> WARN_ON is invalid unless you overwrite iod->nents to be the return of
> dma_map_sg, I think.

Just fyi, the driver selecting when to use SGL vs PRP is done prior to
DMA mapping the scatter list. An IOMMU may map a virtually contiguous
buffer into a single address, which is probably where biggest win for
SGL over PRP exists. I think this driver handling ought to be reworked.



More information about the Linux-nvme mailing list