On 05/09/18 01:45 PM, Jens Axboe wrote: > The point is that the caller doesn't necessarily know where the bio > will end up, hence the caller can't fully check if the whole stack > supports P2P. > > What happens if a P2P request ends up with a driver that doesn't > support it? Yes, that's the whole point this check. Although we expect the caller to do other checks before submitting a P2P request to a queue, so if a driver does submit a P2P request to an unsupported queue, it is definitely a problem in the driver (which is why we want to WARN). Queues that support P2P (only PCI NVMe at this time, see patch 10) must set QUEUE_FLAG_PCI_P2PDMA to indicate it. The check we are adding in blk-core is meant to ensure any broken drivers that submit requests with P2P memory do not get sent to a queue that doesn't indicate support. On top of that, the code in NVMe target ensures that all namespaces on a port are backed by queues that support P2P and, if not, it never allocates any P2P SGLs. Logan _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
- Re: [PATCH v5 07/13] block: Ad... Logan Gunthorpe
- Re: [PATCH v5 07/13] block: Ad... Jens Axboe
- Re: [PATCH v5 07/13] block: Ad... Logan Gunthorpe
- Re: [PATCH v5 07/13] block: Ad... Jens Axboe
- Re: [PATCH v5 07/13] block: Ad... Logan Gunthorpe
- Re: [PATCH v5 07/13] block: Ad... Christoph Hellwig
- Re: [PATCH v5 07/13] block: Ad... Jens Axboe
- Re: [PATCH v5 07/13] block: Ad... Christoph Hellwig
- Re: [PATCH v5 07/13] block: Ad... Logan Gunthorpe
- Re: [PATCH v5 07/13] block: Ad... Christoph Hellwig
- Re: [PATCH v5 07/13] block: Ad... Logan Gunthorpe
- [PATCH v5 11/13] nvme-pci: Add a quirk for a pseudo CMB Logan Gunthorpe
- [PATCH v5 10/13] nvme-pci: Add support for P2P memory in... Logan Gunthorpe
- Re: [PATCH v5 10/13] nvme-pci: Add support for P2P ... Jason Gunthorpe
- Re: [PATCH v5 10/13] nvme-pci: Add support for ... Logan Gunthorpe
- Re: [PATCH v5 10/13] nvme-pci: Add support ... Christoph Hellwig
- [PATCH v5 08/13] IB/core: Ensure we map P2P memory corre... Logan Gunthorpe
- Re: [PATCH v5 08/13] IB/core: Ensure we map P2P mem... Sagi Grimberg
- [PATCH v5 13/13] nvmet: Optionally use PCI P2P memory Logan Gunthorpe
- Re: [PATCH v5 13/13] nvmet: Optionally use PCI P2P ... Sagi Grimberg
- Re: [PATCH v5 13/13] nvmet: Optionally use PCI ... Logan Gunthorpe
