Skip to content

RFC EFA dmabuf memory regions

Gal Pressman dri-devel linux-media linux-rdma lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dma-buf: Fix pin callback commentinclude/linux/dma-buf.h+1 -32 replies
2/2RDMA/efa: Add support for dmabuf memory regionsdrivers/infiniband/hw/efa/efa.h drivers/infiniband/hw/efa/efa_main.c drivers/infiniband/hw/efa/efa_verbs.c+141 -304 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] EFA dmabuf memory regions

Hey all,

This is a followup to my previous RFC [1], which now makes use of the dynamic attachment API implemented in the RDMA subsystem, but calls dma_buf_pin() in order to make sure that the move_notify callback will not be used, as suggested by Christian.
As explained in the previous RFC, move_notify requires the RDMA device to support on-demand-paging (ODP) which is not common on most devices (only supported by mlx5).

While the dynamic requirement makes sense for certain GPUs, some devices (such as habanalabs) have device memory that is always "pinned" and do not need/use the move_notify operation.

The first patch changes the dmabuf documentation to make it clear that pinning does not necessarily mean the memory must be moved to system memory, it is up to the exporter to decide.

The motivation of this RFC is to use habanalabs as the dmabuf exporter, and EFA as the importer to allow for peer2peer access through libibverbs.

[1] https://lore.kernel.org/linux-rdma/[email protected]/

Thanks

Gal Pressman (2):
dma-buf: Fix pin callback comment
RDMA/efa: Add support for dmabuf memory regions

 drivers/infiniband/hw/efa/efa.h       |   4 +
 drivers/infiniband/hw/efa/efa_main.c  |   1 +
 drivers/infiniband/hw/efa/efa_verbs.c | 166 +++++++++++++++++++++-----
 include/linux/dma-buf.h               |   4 +-
 4 files changed, 142 insertions(+), 33 deletions(-)
Signature · 1 line
2.33.0