Provide no lock version of mca_btl_openib_endpoint_post_rr(). On connection
creation we call it with endpoint lock already held. This commit was SVN r17084.
Этот коммит содержится в:
родитель
50af6b9e78
Коммит
51d6ca0cb6
@ -506,7 +506,7 @@ int mca_btl_openib_endpoint_post_recvs(mca_btl_openib_endpoint_t *endpoint)
|
||||
|
||||
for (qp = 0; qp < mca_btl_openib_component.num_qps; ++qp) {
|
||||
if (BTL_OPENIB_QP_TYPE_PP(qp)) {
|
||||
mca_btl_openib_endpoint_post_rr(endpoint, qp);
|
||||
mca_btl_openib_endpoint_post_rr_nolock(endpoint, qp);
|
||||
} else {
|
||||
mca_btl_openib_post_srr(endpoint->endpoint_btl, qp);
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ static inline int post_recvs(mca_btl_base_endpoint_t *ep, const int qp,
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
static inline int mca_btl_openib_endpoint_post_rr(
|
||||
static inline int mca_btl_openib_endpoint_post_rr_nolock(
|
||||
mca_btl_base_endpoint_t *ep, const int qp)
|
||||
{
|
||||
int rd_rsv = mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_rsv;
|
||||
@ -278,8 +278,6 @@ static inline int mca_btl_openib_endpoint_post_rr(
|
||||
|
||||
assert(BTL_OPENIB_QP_TYPE_PP(qp));
|
||||
|
||||
OPAL_THREAD_LOCK(&ep->endpoint_lock);
|
||||
|
||||
if(ep->qps[qp].u.pp_qp.rd_posted <= rd_low)
|
||||
num_post = rd_num - ep->qps[qp].u.pp_qp.rd_posted;
|
||||
|
||||
@ -306,10 +304,19 @@ static inline int mca_btl_openib_endpoint_post_rr(
|
||||
assert(ep->qps[qp].u.pp_qp.rd_credits <= rd_num &&
|
||||
ep->qps[qp].u.pp_qp.rd_credits >= 0);
|
||||
|
||||
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static inline int mca_btl_openib_endpoint_post_rr(
|
||||
mca_btl_base_endpoint_t *ep, const int qp)
|
||||
{
|
||||
int ret;
|
||||
OPAL_THREAD_LOCK(&ep->endpoint_lock);
|
||||
ret = mca_btl_openib_endpoint_post_rr_nolock(ep, qp);
|
||||
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define BTL_OPENIB_CREDITS_SEND_TRYLOCK(E, Q) \
|
||||
OPAL_ATOMIC_CMPSET_32(&(E)->qps[(Q)].rd_credit_send_lock, 0, 1)
|
||||
#define BTL_OPENIB_CREDITS_SEND_UNLOCK(E, Q) \
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user