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;
|
struct mca_mpool_base_reg_mpool_t *reg = recvreq->req_chunk->mpools;
|
||||||
while(reg->mpool != NULL) {
|
while(reg->mpool != NULL) {
|
||||||
if(NULL != mca_pml_ob1_ep_array_find(&proc->btl_rdma,(mca_btl_base_module_t*) reg->user_data)) {
|
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;
|
recvreq->req_mpool = reg;
|
||||||
break;
|
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_pml_ob1_rdma_hdr_t* hdr;
|
||||||
mca_btl_base_descriptor_t* dst;
|
mca_btl_base_descriptor_t* dst;
|
||||||
mca_btl_base_descriptor_t* ctl;
|
mca_btl_base_descriptor_t* ctl;
|
||||||
|
mca_mpool_base_registration_t * reg = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -374,40 +373,24 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
|||||||
size = ep->btl_max_rdma_size;
|
size = ep->btl_max_rdma_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepare a descriptor for RDMA */
|
/*
|
||||||
ompi_convertor_set_position(&recvreq->req_recv.req_convertor, &recvreq->req_rdma_offset);
|
* For now schedule entire message across a single NIC - need to FIX
|
||||||
#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
|
|
||||||
} else {
|
} else {
|
||||||
mca_mpool_base_registration_t * reg;
|
|
||||||
size = bytes_remaining;
|
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){
|
if(NULL != recvreq->req_mpool){
|
||||||
/* find the endpoint corresponding to this btl and schedule the entire message */
|
/* 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;
|
reg = recvreq->req_mpool->mpool_registration;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
ep = mca_pml_ob1_ep_array_get_next(&proc->btl_rdma);
|
ep = mca_pml_ob1_ep_array_get_next(&proc->btl_rdma);
|
||||||
reg = NULL;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* prepare a descriptor for RDMA */
|
||||||
|
ompi_convertor_set_position(&recvreq->req_recv.req_convertor, &recvreq->req_rdma_offset);
|
||||||
#if MCA_PML_OB1_TIMESTAMPS
|
#if MCA_PML_OB1_TIMESTAMPS
|
||||||
recvreq->pin1[recvreq->pin_index] = get_profiler_timestamp();
|
recvreq->pin1[recvreq->pin_index] = get_profiler_timestamp();
|
||||||
#endif
|
#endif
|
||||||
@ -420,9 +403,8 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq)
|
|||||||
&size);
|
&size);
|
||||||
#if MCA_PML_OB1_TIMESTAMPS
|
#if MCA_PML_OB1_TIMESTAMPS
|
||||||
recvreq->pin2[recvreq->pin_index] = get_profiler_timestamp();
|
recvreq->pin2[recvreq->pin_index] = get_profiler_timestamp();
|
||||||
|
recvreq->pin_index++;
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
if(dst == NULL) {
|
if(dst == NULL) {
|
||||||
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
OMPI_THREAD_LOCK(&mca_pml_ob1.lock);
|
||||||
ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
dst->des_cbdata = recvreq;
|
dst->des_cbdata = recvreq;
|
||||||
#if MCA_PML_OB1_TIMESTAMPS
|
|
||||||
recvreq->pin_index++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* prepare a descriptor for rdma control message */
|
/* prepare a descriptor for rdma control message */
|
||||||
hdr_size = sizeof(mca_pml_ob1_rdma_hdr_t);
|
hdr_size = sizeof(mca_pml_ob1_rdma_hdr_t);
|
||||||
|
@ -28,6 +28,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#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 {
|
struct mca_pml_ob1_recv_request_t {
|
||||||
mca_pml_base_recv_request_t req_recv;
|
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_received;
|
||||||
size_t req_bytes_delivered;
|
size_t req_bytes_delivered;
|
||||||
size_t req_rdma_offset;
|
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
|
#if MCA_PML_OB1_TIMESTAMPS
|
||||||
unsigned long long ack;
|
unsigned long long ack;
|
||||||
@ -110,10 +118,18 @@ do { \
|
|||||||
*
|
*
|
||||||
* @param request (IN) Receive request.
|
* @param request (IN) Receive request.
|
||||||
*/
|
*/
|
||||||
#define MCA_PML_OB1_RECV_REQUEST_RETURN(request) \
|
#define MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq) \
|
||||||
do { \
|
do { \
|
||||||
MCA_PML_BASE_RECV_REQUEST_FINI(&request->req_recv); \
|
if(NULL != (recvreq)->req_chunk) { \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_requests, (ompi_list_item_t*)request); \
|
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)
|
} 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.
|
* @return OMPI_SUCESS or error status on failure.
|
||||||
*/
|
*/
|
||||||
#define MCA_PML_OB1_RECV_REQUEST_START(request) \
|
#define MCA_PML_OB1_RECV_REQUEST_START(request) \
|
||||||
{ \
|
do { \
|
||||||
/* init/re-init the request */ \
|
/* init/re-init the request */ \
|
||||||
(request)->req_bytes_received = 0; \
|
(request)->req_bytes_received = 0; \
|
||||||
(request)->req_bytes_delivered = 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 { \
|
} else { \
|
||||||
mca_pml_ob1_recv_request_match_specific(request); \
|
mca_pml_ob1_recv_request_match_specific(request); \
|
||||||
} \
|
} \
|
||||||
}
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -227,8 +227,16 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t);
|
|||||||
|
|
||||||
#define MCA_PML_OB1_SEND_REQUEST_RETURN(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 */ \
|
/* Let the base handle the reference counts */ \
|
||||||
MCA_PML_BASE_SEND_REQUEST_FINI((&sendreq->req_send)); \
|
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
||||||
OMPI_FREE_LIST_RETURN( \
|
OMPI_FREE_LIST_RETURN( \
|
||||||
&mca_pml_ob1.send_requests, (ompi_list_item_t*)sendreq); \
|
&mca_pml_ob1.send_requests, (ompi_list_item_t*)sendreq); \
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user