1
1
This commit was SVN r16554.
Этот коммит содержится в:
Gleb Natapov 2007-10-23 13:33:19 +00:00
родитель d836f3dbbe
Коммит 3a63eb6c17
2 изменённых файлов: 23 добавлений и 29 удалений

Просмотреть файл

@ -470,7 +470,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_alloc(
mca_btl_openib_module_t* openib_btl;
int rc;
openib_btl = (mca_btl_openib_module_t*) btl;
MCA_BTL_IB_FRAG_ALLOC_BY_SIZE(btl, frag, size, rc);
MCA_BTL_IB_FRAG_ALLOC_BY_SIZE(openib_btl, frag, size, rc);
if(NULL == frag)
return NULL;
@ -558,7 +558,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
if(ompi_convertor_need_buffers(convertor) == false && 0 == reserve) {
/* GMS bloody HACK! */
if(registration != NULL || max_data > btl->btl_max_send_size) {
MCA_BTL_IB_FRAG_ALLOC_SEND_USER(btl, frag, rc);
MCA_BTL_IB_FRAG_ALLOC_SEND_USER(openib_btl, frag, rc);
if(NULL == frag) {
return NULL;
}
@ -615,7 +615,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
max_data = btl->btl_max_send_size - reserve;
}
MCA_BTL_IB_FRAG_ALLOC_BY_SIZE(btl, frag, max_data + reserve, rc);
MCA_BTL_IB_FRAG_ALLOC_BY_SIZE(openib_btl, frag, max_data + reserve, rc);
if(NULL == frag)
return NULL;
@ -667,7 +667,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst(
openib_btl = (mca_btl_openib_module_t*)btl;
MCA_BTL_IB_FRAG_ALLOC_RECV_USER(btl, frag, rc);
MCA_BTL_IB_FRAG_ALLOC_RECV_USER(openib_btl, frag, rc);
if(NULL == frag) {
return NULL;
}

Просмотреть файл

@ -205,12 +205,11 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_send_frag_control_t);
*/
#define MCA_BTL_IB_FRAG_ALLOC_CREDIT_WAIT(btl, frag, rc) \
{ \
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_control, item, rc); \
frag = (mca_btl_openib_frag_t*) item; \
}
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT(&(btl)->send_free_control, item, rc); \
frag = (mca_btl_openib_frag_t*)item; \
} while(0)
#define MCA_BTL_IB_FRAG_ALLOC_BY_SIZE(btl, frag, _size, rc) \
do { \
@ -218,38 +217,33 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_send_frag_control_t);
ompi_free_list_item_t* item = NULL; \
for(qp = 0; qp < mca_btl_openib_component.num_qps; qp++) { \
if(mca_btl_openib_component.qp_infos[qp].size >= _size) { \
OMPI_FREE_LIST_GET( \
&((mca_btl_openib_module_t*) btl)->qps[qp].send_free, \
item, rc); \
OMPI_FREE_LIST_GET(&(btl)->qps[qp].send_free, item, rc);\
if(item) \
break; \
} \
} \
frag = (mca_btl_openib_frag_t*) item; \
frag = (mca_btl_openib_frag_t*)item; \
} while(0);
#define MCA_BTL_IB_FRAG_ALLOC_SEND_USER(btl, frag, rc) \
{ \
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_openib_module_t*)btl)->send_user_free, item, rc); \
frag = (mca_btl_openib_frag_t*) item; \
}
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&(btl)->send_user_free, item, rc); \
frag = (mca_btl_openib_frag_t*)item; \
} while(0)
#define MCA_BTL_IB_FRAG_ALLOC_RECV_USER(btl, frag, rc) \
{ \
\
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_openib_module_t*)btl)->recv_user_free, item, rc); \
OMPI_FREE_LIST_GET(&(btl)->recv_user_free, item, rc); \
frag = (mca_btl_openib_frag_t*) item; \
}
} while(0)
#define MCA_BTL_IB_FRAG_RETURN(btl, frag) \
{ do { \
#define MCA_BTL_IB_FRAG_RETURN(btl, frag) \
do { \
OMPI_FREE_LIST_RETURN(frag->list, \
(ompi_free_list_item_t*)(frag)); \
} while(0); \
}
(ompi_free_list_item_t*)(frag)); \
} while(0);
#define MCA_BTL_OPENIB_CLEAN_PENDING_FRAGS(btl,list) \
while(!opal_list_is_empty(list)){ \