From 251009e0aaa9138eecf762a95684a29211d5fb06 Mon Sep 17 00:00:00 2001 From: Francois WELLENREITER Date: Thu, 19 Nov 2015 14:51:00 +0100 Subject: [PATCH] BTL portals4: remove useless PtlMDBind PtlMDRelease calls for RMDA --- opal/mca/btl/portals4/btl_portals4.c | 1 - .../mca/btl/portals4/btl_portals4_component.c | 8 ++----- opal/mca/btl/portals4/btl_portals4_frag.h | 3 +-- opal/mca/btl/portals4/btl_portals4_rdma.c | 22 +++++-------------- 4 files changed, 8 insertions(+), 26 deletions(-) diff --git a/opal/mca/btl/portals4/btl_portals4.c b/opal/mca/btl/portals4/btl_portals4.c index 6594e4c0d2..afb6f597fb 100644 --- a/opal/mca/btl/portals4/btl_portals4.c +++ b/opal/mca/btl/portals4/btl_portals4.c @@ -500,7 +500,6 @@ mca_btl_portals4_alloc(struct mca_btl_base_module_t* btl_base, size : portals4_btl->super.btl_max_send_size ; } - frag->md_h = PTL_INVALID_HANDLE; frag->base.des_segment_count = 1; frag->base.des_flags = flags | MCA_BTL_DES_SEND_ALWAYS_CALLBACK; frag->base.order = MCA_BTL_NO_ORDER; diff --git a/opal/mca/btl/portals4/btl_portals4_component.c b/opal/mca/btl/portals4/btl_portals4_component.c index 2c6bb192f8..5834ac4744 100644 --- a/opal/mca/btl/portals4/btl_portals4_component.c +++ b/opal/mca/btl/portals4/btl_portals4_component.c @@ -692,8 +692,8 @@ mca_btl_portals4_component_progress(void) /* The distant PtlMEAppend is not finished (distant PTL_EVENT_LINK not received) */ /* Re-issue the PtlGet (see btl_portals4_rdma.c) */ - ret = PtlGet(frag->md_h, - 0, + ret = PtlGet(portals4_btl->send_md_h, + (ptl_size_t) frag->addr, frag->length, frag->peer_proc, portals4_btl->recv_idx, @@ -704,8 +704,6 @@ mca_btl_portals4_component_progress(void) opal_output_verbose(1, opal_btl_base_framework.framework_output, "%s:%d: Re-issued PtlGet failed: %d", __FILE__, __LINE__, ret); - PtlMDRelease(frag->md_h); - frag->md_h = PTL_INVALID_HANDLE; return OPAL_ERROR; } @@ -724,8 +722,6 @@ mca_btl_portals4_component_progress(void) frag->rdma_cb.context, frag->rdma_cb.data, OPAL_SUCCESS); - PtlMDRelease(frag->md_h); - frag->md_h = PTL_INVALID_HANDLE; OPAL_BTL_PORTALS4_FRAG_RETURN_USER(&portals4_btl->super, frag); OPAL_THREAD_ADD32(&portals4_btl->portals_outstanding_ops, -1); diff --git a/opal/mca/btl/portals4/btl_portals4_frag.h b/opal/mca/btl/portals4/btl_portals4_frag.h index 76c610c8de..8f3c6e49ac 100644 --- a/opal/mca/btl/portals4/btl_portals4_frag.h +++ b/opal/mca/btl/portals4/btl_portals4_frag.h @@ -45,10 +45,9 @@ struct mca_btl_portals4_frag_t { mca_btl_base_header_t hdr; /* handle to use for communication */ ptl_handle_me_t me_h; - /* handle to use for communication */ - ptl_handle_md_t md_h; /* size of the allocated memory region -- not the amount of data we need to send */ + void *addr; size_t size; /* match bits for retransmit case */ ptl_match_bits_t match_bits; diff --git a/opal/mca/btl/portals4/btl_portals4_rdma.c b/opal/mca/btl/portals4/btl_portals4_rdma.c index 1ff765b98a..245694455e 100644 --- a/opal/mca/btl/portals4/btl_portals4_rdma.c +++ b/opal/mca/btl/portals4/btl_portals4_rdma.c @@ -78,17 +78,6 @@ mca_btl_portals4_get(struct mca_btl_base_module_t* btl_base, frag->endpoint = btl_peer; frag->hdr.tag = MCA_BTL_TAG_MAX; - /* Bind the memory */ - md.start = (void *)local_address; - md.length = size; - md.options = 0; - md.eq_handle = portals4_btl->recv_eq_h; - md.ct_handle = PTL_CT_NONE; - - ret = PtlMDBind(portals4_btl->portals_ni_h, - &md, - &frag->md_h); - if (OPAL_UNLIKELY(PTL_OK != ret)) { opal_output_verbose(1, opal_btl_base_framework.framework_output, "%s:%d: PtlMDBind failed: %d", @@ -97,15 +86,16 @@ mca_btl_portals4_get(struct mca_btl_base_module_t* btl_base, } frag->match_bits = remote_handle->key; - frag->length = md.length; + frag->addr = local_address; + frag->length = size; frag->peer_proc = btl_peer->ptl_proc; OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, "PtlGet start=%p length=%ld nid=%x pid=%x match_bits=%lx\n", md.start, md.length, btl_peer->ptl_proc.phys.nid, btl_peer->ptl_proc.phys.pid, frag->match_bits)); - ret = PtlGet(frag->md_h, - 0, - md.length, + ret = PtlGet(portals4_btl->send_md_h, + (ptl_size_t) local_address, + size, btl_peer->ptl_proc, portals4_btl->recv_idx, frag->match_bits, /* match bits */ @@ -115,8 +105,6 @@ mca_btl_portals4_get(struct mca_btl_base_module_t* btl_base, opal_output_verbose(1, opal_btl_base_framework.framework_output, "%s:%d: PtlGet failed: %d", __FILE__, __LINE__, ret); - PtlMDRelease(frag->md_h); - frag->md_h = PTL_INVALID_HANDLE; return OPAL_ERROR; } OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, "SUCCESS: PtlGet start=%p length=%ld nid=%x pid=%x match_bits=%lx\n",