Return OMPI_ERR_RESOURCE_BUSY from openib_btl_send() if fragment is not on wire.
This commit was SVN r16906.
Этот коммит содержится в:
родитель
e0dc53e516
Коммит
2f9c5b46cf
@ -1109,7 +1109,7 @@ int mca_btl_openib_put( mca_btl_base_module_t* btl,
|
|||||||
OPAL_THREAD_LOCK(&ep->endpoint_lock);
|
OPAL_THREAD_LOCK(&ep->endpoint_lock);
|
||||||
rc = check_endpoint_state(ep, descriptor, &ep->pending_put_frags);
|
rc = check_endpoint_state(ep, descriptor, &ep->pending_put_frags);
|
||||||
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
||||||
if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc)
|
if(OMPI_ERR_RESOURCE_BUSY == rc)
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
if(OMPI_SUCCESS != rc)
|
if(OMPI_SUCCESS != rc)
|
||||||
return rc;
|
return rc;
|
||||||
@ -1178,7 +1178,7 @@ int mca_btl_openib_get(mca_btl_base_module_t* btl,
|
|||||||
OPAL_THREAD_LOCK(&ep->endpoint_lock);
|
OPAL_THREAD_LOCK(&ep->endpoint_lock);
|
||||||
rc = check_endpoint_state(ep, descriptor, &ep->pending_get_frags);
|
rc = check_endpoint_state(ep, descriptor, &ep->pending_get_frags);
|
||||||
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
||||||
if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc)
|
if(OMPI_ERR_RESOURCE_BUSY == rc)
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
if(OMPI_SUCCESS != rc)
|
if(OMPI_SUCCESS != rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -190,7 +190,7 @@ int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_t *endpoint,
|
|||||||
qp = des->order;
|
qp = des->order;
|
||||||
|
|
||||||
if(acruire_wqe(endpoint, frag) != OMPI_SUCCESS)
|
if(acruire_wqe(endpoint, frag) != OMPI_SUCCESS)
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_RESOURCE_BUSY;
|
||||||
|
|
||||||
eager_limit = mca_btl_openib_component.eager_limit +
|
eager_limit = mca_btl_openib_component.eager_limit +
|
||||||
sizeof(mca_btl_openib_header_coalesced_t) +
|
sizeof(mca_btl_openib_header_coalesced_t) +
|
||||||
@ -204,7 +204,7 @@ int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_t *endpoint,
|
|||||||
|
|
||||||
if(!do_rdma && acquire_send_credit(endpoint, frag) != OMPI_SUCCESS) {
|
if(!do_rdma && acquire_send_credit(endpoint, frag) != OMPI_SUCCESS) {
|
||||||
qp_put_wqe(endpoint, qp);
|
qp_put_wqe(endpoint, qp);
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_RESOURCE_BUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
GET_CREDITS(endpoint->eager_rdma_local.credits, hdr->credits);
|
GET_CREDITS(endpoint->eager_rdma_local.credits, hdr->credits);
|
||||||
@ -589,13 +589,8 @@ int mca_btl_openib_endpoint_send(mca_btl_base_endpoint_t* ep,
|
|||||||
rc = check_endpoint_state(ep, &to_base_frag(frag)->base,
|
rc = check_endpoint_state(ep, &to_base_frag(frag)->base,
|
||||||
&ep->pending_lazy_frags);
|
&ep->pending_lazy_frags);
|
||||||
|
|
||||||
if(OPAL_LIKELY(rc == OMPI_SUCCESS)) {
|
if(OPAL_LIKELY(rc == OMPI_SUCCESS))
|
||||||
rc = mca_btl_openib_endpoint_post_send(ep, frag);
|
rc = mca_btl_openib_endpoint_post_send(ep, frag);
|
||||||
if(OMPI_ERR_OUT_OF_RESOURCE == rc)
|
|
||||||
rc = OMPI_SUCCESS;
|
|
||||||
} else if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc) {
|
|
||||||
rc = OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
@ -774,12 +769,13 @@ static int mca_btl_openib_endpoint_send_eager_rdma(
|
|||||||
rdma_hdr->rdma_start.ival
|
rdma_hdr->rdma_start.ival
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if (mca_btl_openib_endpoint_send(endpoint, frag) != OMPI_SUCCESS) {
|
rc = mca_btl_openib_endpoint_send(endpoint, frag);
|
||||||
MCA_BTL_IB_FRAG_RETURN(frag);
|
if (OMPI_SUCCESS == rc ||OMPI_ERR_RESOURCE_BUSY == rc)
|
||||||
BTL_ERROR(("Error sending RDMA buffer", strerror(errno)));
|
return OMPI_SUCCESS;
|
||||||
return -1;
|
|
||||||
}
|
MCA_BTL_IB_FRAG_RETURN(frag);
|
||||||
return 0;
|
BTL_ERROR(("Error sending RDMA buffer", strerror(errno)));
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup eager RDMA buffers and notify the remote endpoint*/
|
/* Setup eager RDMA buffers and notify the remote endpoint*/
|
||||||
@ -854,7 +850,7 @@ void mca_btl_openib_endpoint_connect_eager_rdma(
|
|||||||
opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, (void*)1,
|
opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, (void*)1,
|
||||||
buf);
|
buf);
|
||||||
|
|
||||||
if(mca_btl_openib_endpoint_send_eager_rdma(endpoint) == 0) {
|
if(mca_btl_openib_endpoint_send_eager_rdma(endpoint) == OMPI_SUCCESS) {
|
||||||
/* This can never fail because max number of entries allocated
|
/* This can never fail because max number of entries allocated
|
||||||
* at init time */
|
* at init time */
|
||||||
OBJ_RETAIN(endpoint);
|
OBJ_RETAIN(endpoint);
|
||||||
|
@ -352,13 +352,13 @@ try_send:
|
|||||||
static inline int check_endpoint_state(mca_btl_openib_endpoint_t *ep,
|
static inline int check_endpoint_state(mca_btl_openib_endpoint_t *ep,
|
||||||
mca_btl_base_descriptor_t *des, opal_list_t *pending_list)
|
mca_btl_base_descriptor_t *des, opal_list_t *pending_list)
|
||||||
{
|
{
|
||||||
int rc = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
int rc = ORTE_ERR_RESOURCE_BUSY;
|
||||||
|
|
||||||
switch(ep->endpoint_state) {
|
switch(ep->endpoint_state) {
|
||||||
case MCA_BTL_IB_CLOSED:
|
case MCA_BTL_IB_CLOSED:
|
||||||
rc = ompi_btl_openib_connect.bcf_start_connect(ep);
|
rc = ompi_btl_openib_connect.bcf_start_connect(ep);
|
||||||
if(rc == OMPI_SUCCESS)
|
if(rc == OMPI_SUCCESS)
|
||||||
rc = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
rc = ORTE_ERR_RESOURCE_BUSY;
|
||||||
/*
|
/*
|
||||||
* As long as we expect a message from the peer (in order
|
* As long as we expect a message from the peer (in order
|
||||||
* to setup the connection) let the event engine pool the
|
* to setup the connection) let the event engine pool the
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user