* Controller memory buffer - P2PDMA question
@ 2019-04-23 17:55 Heitke, Kenneth
2019-04-23 18:02 ` Keith Busch
0 siblings, 1 reply; 3+ messages in thread
From: Heitke, Kenneth @ 2019-04-23 17:55 UTC (permalink / raw)
For the controller memory buffer, the read-data (RDS) and write-data
(WDS) support isn't required to symmetrical since there are individual
bits for each. The code below requires that both be supported before the
P2P memory will be published
nvme_map_cmb:nvme/host/pci.c
if ((dev->cmbsz & (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS)) ==
(NVME_CMBSZ_WDS | NVME_CMBSZ_RDS))
pci_p2pmem_publish(pdev, true);
Would it make sense for P2PDMA to support the idea of directionality?
Should a device be able to publish its controller memory buffer just for
TO_DEVICE and/or FROM_DEVICE?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Controller memory buffer - P2PDMA question
2019-04-23 17:55 Controller memory buffer - P2PDMA question Heitke, Kenneth
@ 2019-04-23 18:02 ` Keith Busch
2019-04-23 18:24 ` Logan Gunthorpe
0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2019-04-23 18:02 UTC (permalink / raw)
On Tue, Apr 23, 2019@11:55:03AM -0600, Heitke, Kenneth wrote:
> For the controller memory buffer, the read-data (RDS) and write-data (WDS)
> support isn't required to symmetrical since there are individual bits for
> each. The code below requires that both be supported before the P2P memory
> will be published
>
> nvme_map_cmb:nvme/host/pci.c
>
> if ((dev->cmbsz & (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS)) ==
> (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS))
> pci_p2pmem_publish(pdev, true);
>
> Would it make sense for P2PDMA to support the idea of directionality? Should
> a device be able to publish its controller memory buffer just for TO_DEVICE
> and/or FROM_DEVICE?
P2P needs both directions for registered device memory. It
indiscriminately selects peer destinations, which are later used as
sources.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Controller memory buffer - P2PDMA question
2019-04-23 18:02 ` Keith Busch
@ 2019-04-23 18:24 ` Logan Gunthorpe
0 siblings, 0 replies; 3+ messages in thread
From: Logan Gunthorpe @ 2019-04-23 18:24 UTC (permalink / raw)
On 2019-04-23 12:02 p.m., Keith Busch wrote:
> On Tue, Apr 23, 2019@11:55:03AM -0600, Heitke, Kenneth wrote:
>> For the controller memory buffer, the read-data (RDS) and write-data (WDS)
>> support isn't required to symmetrical since there are individual bits for
>> each. The code below requires that both be supported before the P2P memory
>> will be published
>>
>> nvme_map_cmb:nvme/host/pci.c
>>
>> if ((dev->cmbsz & (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS)) ==
>> (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS))
>> pci_p2pmem_publish(pdev, true);
>>
>> Would it make sense for P2PDMA to support the idea of directionality? Should
>> a device be able to publish its controller memory buffer just for TO_DEVICE
>> and/or FROM_DEVICE?
>
> P2P needs both directions for registered device memory. It
> indiscriminately selects peer destinations, which are later used as
> sources.
Yes, though in theory the p2pdma code could track this. It really comes
down to the fact that we can add that functionality/complexity if/when
there are actually users that can make use of it.
Logan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-23 18:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 17:55 Controller memory buffer - P2PDMA question Heitke, Kenneth
2019-04-23 18:02 ` Keith Busch
2019-04-23 18:24 ` Logan Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.