Re: [PATCH v3 11/11] nvmet: Optionally use PCI P2P memory

2018-03-21 Thread Logan Gunthorpe
On 21/03/18 03:27 AM, Christoph Hellwig wrote: >> + const char *page, size_t count) >> +{ >> +struct nvmet_port *port = to_nvmet_port(item); >> +struct device *dev; >> +struct pci_dev *p2p_dev = NULL; >> +bool use_p2pmem; >> + >> +switch (page[0])

Re: [PATCH v3 11/11] nvmet: Optionally use PCI P2P memory

2018-03-21 Thread Christoph Hellwig
> + const char *page, size_t count) > +{ > + struct nvmet_port *port = to_nvmet_port(item); > + struct device *dev; > + struct pci_dev *p2p_dev = NULL; > + bool use_p2pmem; > + > + switch (page[0]) { > + case 'y': > + case 'Y': > + case

[PATCH v3 11/11] nvmet: Optionally use PCI P2P memory

2018-03-12 Thread Logan Gunthorpe
We create a configfs attribute in each nvme-fabrics target port to enable p2p memory use. When enabled, the port will only then use the p2p memory if a p2p memory device can be found which is behind the same switch as the RDMA port and all the block devices in use. If the user enabled it an no