Skip to content

Commit

Permalink
[v1.21.x]prov/efa: always use p2p for system memory
Browse files Browse the repository at this point in the history
P2P is always available for host memory. Unregistered buffer will be
regarded as host memory as EFA provider requires FI_MR_HMEM.

Signed-off-by: Jessie Yang <[email protected]>
(cherry picked from commit b0af713)
  • Loading branch information
jiaxiyan committed Sep 18, 2024
1 parent eab9e22 commit f4d8991
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions prov/efa/src/rdm/efa_rdm_ep.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,11 @@ bool efa_rdm_ep_should_write_rnr_completion(struct efa_rdm_ep *ep)
static inline
int efa_rdm_ep_use_p2p(struct efa_rdm_ep *efa_rdm_ep, struct efa_mr *efa_mr)
{
if (!efa_mr)
return 0;

/*
* always send from host buffers if we have a descriptor
* P2P is always available for host memory (Unregistered buffer will be
* regarded as host memory as EFA provider requires FI_MR_HMEM)
*/
if (efa_mr->peer.iface == FI_HMEM_SYSTEM)
if (!efa_mr || efa_mr->peer.iface == FI_HMEM_SYSTEM)
return 1;

if (efa_rdm_ep_domain(efa_rdm_ep)->hmem_info[efa_mr->peer.iface].p2p_supported_by_device)
Expand Down

0 comments on commit f4d8991

Please sign in to comment.