1
0
Fork 0
alistair23-linux/drivers/nvme/target
Logan Gunthorpe c6925093d0 nvmet: Optionally use PCI P2P memory
Create a configfs attribute in each nvme-fabrics namespace to enable P2P
memory use.  The attribute may be enabled (with a boolean) or a specific
P2P device may be given (with the device's PCI name).

When enabled, the namespace will ensure the underlying block device
supports P2P and is compatible with any specified P2P device.  If no device
was specified it will ensure there is compatible P2P memory somewhere in
the system.  Enabling a namespace with P2P memory will fail with EINVAL
(and an appropriate dmesg error) if any of these conditions are not met.

Once a controller is set up on a specific port, the P2P device to use for
each namespace will be found and stored in a radix tree by namespace ID.
When memory is allocated for a request, the tree is used to look up the P2P
device to allocate memory against.  If no device is in the tree (because no
appropriate device was found), or if allocation of P2P memory fails, fall
back to using regular memory.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
[hch: partial rewrite of the initial code]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2018-10-17 12:18:24 -05:00
..
Kconfig nvmet-rdma: depend on INFINIBAND_ADDR_TRANS 2018-04-27 11:15:43 -04:00
Makefile nvmet: add simple file backed ns support 2018-05-25 16:50:12 +02:00
admin-cmd.c nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
configfs.c nvmet: Optionally use PCI P2P memory 2018-10-17 12:18:24 -05:00
core.c nvmet: Optionally use PCI P2P memory 2018-10-17 12:18:24 -05:00
discovery.c nvmet-rdma: support max(16KB, PAGE_SIZE) inline data 2018-07-23 09:35:16 +02:00
fabrics-cmd.c nvmet: remove duplicate NULL initialization for req->ns 2018-05-25 16:50:12 +02:00
fc.c nvmet-fc: fix target sgl list on large transfers 2018-07-24 13:44:09 +02:00
fcloop.c nvme-fcloop: Fix dropped LS's to removed target port 2018-08-28 08:40:43 +02:00
io-cmd-bdev.c nvmet: Optionally use PCI P2P memory 2018-10-17 12:18:24 -05:00
io-cmd-file.c nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
loop.c for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
nvmet.h nvmet: Optionally use PCI P2P memory 2018-10-17 12:18:24 -05:00
rdma.c nvmet: Optionally use PCI P2P memory 2018-10-17 12:18:24 -05:00