release registrations
This commit was SVN r6254.
Этот коммит содержится в:
родитель
a5fa5f394c
Коммит
901fef8af2
@ -153,8 +153,6 @@ static void mca_pml_ob1_recv_request_ack(
|
||||
struct mca_mpool_base_reg_mpool_t *reg = recvreq->req_chunk->mpools;
|
||||
while(reg->mpool != NULL) {
|
||||
if(NULL != mca_pml_ob1_ep_array_find(&proc->btl_rdma,(mca_btl_base_module_t*) reg->user_data)) {
|
||||
recvreq->req_rdma_offset = hdr->hdr_frag_length;
|
||||
ack->hdr_rdma_offset = hdr->hdr_frag_length;
|
||||
recvreq->req_mpool = reg;
|
||||
break;
|
||||
}
|
||||
@ -344,6 +342,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
||||
mca_pml_ob1_rdma_hdr_t* hdr;
|
||||
mca_btl_base_descriptor_t* dst;
|
||||
mca_btl_base_descriptor_t* ctl;
|
||||
mca_mpool_base_registration_t * reg = NULL;
|
||||
int rc;
|
||||
|
||||
/*
|
||||
@ -374,55 +373,38 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
||||
size = ep->btl_max_rdma_size;
|
||||
}
|
||||
|
||||
/* prepare a descriptor for RDMA */
|
||||
ompi_convertor_set_position(&recvreq->req_recv.req_convertor, &recvreq->req_rdma_offset);
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
recvreq->pin1[recvreq->pin_index] = get_profiler_timestamp();
|
||||
#endif
|
||||
dst = ep->btl_prepare_dst(
|
||||
ep->btl,
|
||||
ep->btl_endpoint,
|
||||
NULL,
|
||||
&recvreq->req_recv.req_convertor,
|
||||
0,
|
||||
&size);
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
recvreq->pin2[recvreq->pin_index] = get_profiler_timestamp();
|
||||
#endif
|
||||
/*
|
||||
* For now schedule entire message across a single NIC - need to FIX
|
||||
*/
|
||||
} else {
|
||||
mca_mpool_base_registration_t * reg;
|
||||
size = bytes_remaining;
|
||||
|
||||
/* prepare a descriptor for RDMA */
|
||||
ompi_convertor_set_position(&recvreq->req_recv.req_convertor, &recvreq->req_rdma_offset);
|
||||
|
||||
if(NULL != recvreq->req_mpool){
|
||||
/* find the endpoint corresponding to this btl and schedule the entire message */
|
||||
ep = mca_pml_ob1_ep_array_find(&proc->btl_rdma, (mca_btl_base_module_t*) recvreq->req_mpool->user_data);
|
||||
ep = mca_pml_ob1_ep_array_find(&proc->btl_rdma,
|
||||
(mca_btl_base_module_t*) recvreq->req_mpool->user_data);
|
||||
reg = recvreq->req_mpool->mpool_registration;
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
ep = mca_pml_ob1_ep_array_get_next(&proc->btl_rdma);
|
||||
reg = NULL;
|
||||
}
|
||||
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
recvreq->pin1[recvreq->pin_index] = get_profiler_timestamp();
|
||||
#endif
|
||||
dst = ep->btl_prepare_dst(
|
||||
ep->btl,
|
||||
ep->btl_endpoint,
|
||||
reg,
|
||||
&recvreq->req_recv.req_convertor,
|
||||
0,
|
||||
&size);
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
recvreq->pin2[recvreq->pin_index] = get_profiler_timestamp();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* prepare a descriptor for RDMA */
|
||||
ompi_convertor_set_position(&recvreq->req_recv.req_convertor, &recvreq->req_rdma_offset);
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
recvreq->pin1[recvreq->pin_index] = get_profiler_timestamp();
|
||||
#endif
|
||||
dst = ep->btl_prepare_dst(
|
||||
ep->btl,
|
||||
ep->btl_endpoint,
|
||||
reg,
|
||||
&recvreq->req_recv.req_convertor,
|
||||
0,
|
||||
&size);
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
recvreq->pin2[recvreq->pin_index] = get_profiler_timestamp();
|
||||
recvreq->pin_index++;
|
||||
#endif
|
||||
if(dst == NULL) {
|
||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||
ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq);
|
||||
@ -430,9 +412,6 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
||||
break;
|
||||
}
|
||||
dst->des_cbdata = recvreq;
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
recvreq->pin_index++;
|
||||
#endif
|
||||
|
||||
/* prepare a descriptor for rdma control message */
|
||||
hdr_size = sizeof(mca_pml_ob1_rdma_hdr_t);
|
||||
|
@ -28,6 +28,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct mca_pml_ob1_registration_t {
|
||||
struct mca_pml_ob1_endpoint_t* endpoint;
|
||||
struct mca_mpool_base_registration_t* registration;
|
||||
};
|
||||
typedef struct mca_pml_ob1_registration_t mca_pml_ob1_registration_t;
|
||||
|
||||
|
||||
struct mca_pml_ob1_recv_request_t {
|
||||
mca_pml_base_recv_request_t req_recv;
|
||||
@ -40,6 +46,8 @@ struct mca_pml_ob1_recv_request_t {
|
||||
size_t req_bytes_received;
|
||||
size_t req_bytes_delivered;
|
||||
size_t req_rdma_offset;
|
||||
mca_pml_ob1_registration_t req_reg[MCA_MPOOL_BASE_MAX_REG];
|
||||
size_t req_num_reg;
|
||||
|
||||
#if MCA_PML_OB1_TIMESTAMPS
|
||||
unsigned long long ack;
|
||||
@ -110,10 +118,18 @@ do { \
|
||||
*
|
||||
* @param request (IN) Receive request.
|
||||
*/
|
||||
#define MCA_PML_OB1_RECV_REQUEST_RETURN(request) \
|
||||
do { \
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI(&request->req_recv); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_requests, (ompi_list_item_t*)request); \
|
||||
#define MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq) \
|
||||
do { \
|
||||
if(NULL != (recvreq)->req_chunk) { \
|
||||
mca_mpool_base_reg_mpool_t* reg = (recvreq)->req_chunk->mpools; \
|
||||
while(NULL != reg->mpool) { \
|
||||
OBJ_RELEASE(reg->mpool_registration); \
|
||||
} \
|
||||
OBJ_RELEASE((recvreq)->req_chunk); \
|
||||
} \
|
||||
\
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_requests, (ompi_list_item_t*)(recvreq)); \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
@ -150,7 +166,7 @@ void mca_pml_ob1_recv_request_match_specific(mca_pml_ob1_recv_request_t* request
|
||||
* @return OMPI_SUCESS or error status on failure.
|
||||
*/
|
||||
#define MCA_PML_OB1_RECV_REQUEST_START(request) \
|
||||
{ \
|
||||
do { \
|
||||
/* init/re-init the request */ \
|
||||
(request)->req_bytes_received = 0; \
|
||||
(request)->req_bytes_delivered = 0; \
|
||||
@ -177,7 +193,7 @@ void mca_pml_ob1_recv_request_match_specific(mca_pml_ob1_recv_request_t* request
|
||||
} else { \
|
||||
mca_pml_ob1_recv_request_match_specific(request); \
|
||||
} \
|
||||
}
|
||||
} while (0)
|
||||
|
||||
|
||||
/**
|
||||
|
@ -225,12 +225,20 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t);
|
||||
*/
|
||||
|
||||
|
||||
#define MCA_PML_OB1_SEND_REQUEST_RETURN(sendreq) \
|
||||
{ \
|
||||
/* Let the base handle the reference counts */ \
|
||||
MCA_PML_BASE_SEND_REQUEST_FINI((&sendreq->req_send)); \
|
||||
OMPI_FREE_LIST_RETURN( \
|
||||
&mca_pml_ob1.send_requests, (ompi_list_item_t*)sendreq); \
|
||||
#define MCA_PML_OB1_SEND_REQUEST_RETURN(sendreq) \
|
||||
{ \
|
||||
if(NULL != (sendreq)->req_chunk) { \
|
||||
mca_mpool_base_reg_mpool_t* reg = (sendreq)->req_chunk->mpools; \
|
||||
while(NULL != reg->mpool) { \
|
||||
OBJ_RELEASE(reg->mpool_registration); \
|
||||
} \
|
||||
OBJ_RELEASE((sendreq)->req_chunk); \
|
||||
} \
|
||||
\
|
||||
/* Let the base handle the reference counts */ \
|
||||
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
||||
OMPI_FREE_LIST_RETURN( \
|
||||
&mca_pml_ob1.send_requests, (ompi_list_item_t*)sendreq); \
|
||||
}
|
||||
|
||||
/**
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user