Skip to content

Commit a2e03a1

Browse files
author
Francois WELLENREITER
committed
BTL portals4: remove useless PtlMDBind PtlMDRelease calls for RMDA
1 parent 1960f2c commit a2e03a1

File tree

4 files changed

+8
-26
lines changed

4 files changed

+8
-26
lines changed

opal/mca/btl/portals4/btl_portals4.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ mca_btl_portals4_alloc(struct mca_btl_base_module_t* btl_base,
500500
size : portals4_btl->super.btl_max_send_size ;
501501
}
502502

503-
frag->md_h = PTL_INVALID_HANDLE;
504503
frag->base.des_segment_count = 1;
505504
frag->base.des_flags = flags | MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
506505
frag->base.order = MCA_BTL_NO_ORDER;

opal/mca/btl/portals4/btl_portals4_component.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,8 @@ mca_btl_portals4_component_progress(void)
692692

693693
/* The distant PtlMEAppend is not finished (distant PTL_EVENT_LINK not received) */
694694
/* Re-issue the PtlGet (see btl_portals4_rdma.c) */
695-
ret = PtlGet(frag->md_h,
696-
0,
695+
ret = PtlGet(portals4_btl->send_md_h,
696+
(ptl_size_t) frag->addr,
697697
frag->length,
698698
frag->peer_proc,
699699
portals4_btl->recv_idx,
@@ -704,8 +704,6 @@ mca_btl_portals4_component_progress(void)
704704
opal_output_verbose(1, opal_btl_base_framework.framework_output,
705705
"%s:%d: Re-issued PtlGet failed: %d",
706706
__FILE__, __LINE__, ret);
707-
PtlMDRelease(frag->md_h);
708-
frag->md_h = PTL_INVALID_HANDLE;
709707
return OPAL_ERROR;
710708
}
711709

@@ -724,8 +722,6 @@ mca_btl_portals4_component_progress(void)
724722
frag->rdma_cb.context,
725723
frag->rdma_cb.data,
726724
OPAL_SUCCESS);
727-
PtlMDRelease(frag->md_h);
728-
frag->md_h = PTL_INVALID_HANDLE;
729725

730726
OPAL_BTL_PORTALS4_FRAG_RETURN_USER(&portals4_btl->super, frag);
731727
OPAL_THREAD_ADD32(&portals4_btl->portals_outstanding_ops, -1);

opal/mca/btl/portals4/btl_portals4_frag.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ struct mca_btl_portals4_frag_t {
4545
mca_btl_base_header_t hdr;
4646
/* handle to use for communication */
4747
ptl_handle_me_t me_h;
48-
/* handle to use for communication */
49-
ptl_handle_md_t md_h;
5048
/* size of the allocated memory region -- not the amount of data
5149
we need to send */
50+
void *addr;
5251
size_t size;
5352
/* match bits for retransmit case */
5453
ptl_match_bits_t match_bits;

opal/mca/btl/portals4/btl_portals4_rdma.c

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,6 @@ mca_btl_portals4_get(struct mca_btl_base_module_t* btl_base,
7878
frag->endpoint = btl_peer;
7979
frag->hdr.tag = MCA_BTL_TAG_MAX;
8080

81-
/* Bind the memory */
82-
md.start = (void *)local_address;
83-
md.length = size;
84-
md.options = 0;
85-
md.eq_handle = portals4_btl->recv_eq_h;
86-
md.ct_handle = PTL_CT_NONE;
87-
88-
ret = PtlMDBind(portals4_btl->portals_ni_h,
89-
&md,
90-
&frag->md_h);
91-
9281
if (OPAL_UNLIKELY(PTL_OK != ret)) {
9382
opal_output_verbose(1, opal_btl_base_framework.framework_output,
9483
"%s:%d: PtlMDBind failed: %d",
@@ -97,15 +86,16 @@ mca_btl_portals4_get(struct mca_btl_base_module_t* btl_base,
9786
}
9887

9988
frag->match_bits = remote_handle->key;
100-
frag->length = md.length;
89+
frag->addr = local_address;
90+
frag->length = size;
10191
frag->peer_proc = btl_peer->ptl_proc;
10292

10393
OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, "PtlGet start=%p length=%ld nid=%x pid=%x match_bits=%lx\n",
10494
md.start, md.length, btl_peer->ptl_proc.phys.nid, btl_peer->ptl_proc.phys.pid, frag->match_bits));
10595

106-
ret = PtlGet(frag->md_h,
107-
0,
108-
md.length,
96+
ret = PtlGet(portals4_btl->send_md_h,
97+
(ptl_size_t) local_address,
98+
size,
10999
btl_peer->ptl_proc,
110100
portals4_btl->recv_idx,
111101
frag->match_bits, /* match bits */
@@ -115,8 +105,6 @@ mca_btl_portals4_get(struct mca_btl_base_module_t* btl_base,
115105
opal_output_verbose(1, opal_btl_base_framework.framework_output,
116106
"%s:%d: PtlGet failed: %d",
117107
__FILE__, __LINE__, ret);
118-
PtlMDRelease(frag->md_h);
119-
frag->md_h = PTL_INVALID_HANDLE;
120108
return OPAL_ERROR;
121109
}
122110
OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, "SUCCESS: PtlGet start=%p length=%ld nid=%x pid=%x match_bits=%lx\n",

0 commit comments

Comments
 (0)