Add type to frag. Sometimes we need to know that a frag is from short rdma area.
I used hack for this that doesn't work for mvapi, so changing it to something more sane. This commit was SVN r9477.
Этот коммит содержится в:
родитель
e0eb9a19e7
Коммит
79bcfb096f
@ -653,10 +653,8 @@ int mca_btl_openib_handle_incoming_hp(
|
|||||||
/* repost receive descriptors */
|
/* repost receive descriptors */
|
||||||
#ifdef OMPI_MCA_BTL_OPENIB_HAVE_SRQ
|
#ifdef OMPI_MCA_BTL_OPENIB_HAVE_SRQ
|
||||||
if(mca_btl_openib_component.use_srq) {
|
if(mca_btl_openib_component.use_srq) {
|
||||||
if (!MCA_BTL_OPENIB_RDMA_FRAG(frag)) {
|
OPAL_THREAD_ADD32((int32_t*) &openib_btl->srd_posted_hp, -1);
|
||||||
OPAL_THREAD_ADD32((int32_t*) &openib_btl->srd_posted_hp, -1);
|
MCA_BTL_OPENIB_POST_SRR_HIGH(openib_btl, 0);
|
||||||
MCA_BTL_OPENIB_POST_SRR_HIGH(openib_btl, 0);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
if (!MCA_BTL_OPENIB_RDMA_FRAG(frag)) {
|
if (!MCA_BTL_OPENIB_RDMA_FRAG(frag)) {
|
||||||
|
@ -43,10 +43,8 @@ struct mca_btl_openib_eager_rdma_remote_t {
|
|||||||
};
|
};
|
||||||
typedef struct mca_btl_openib_eager_rdma_remote_t mca_btl_openib_eager_rdma_remote_t;
|
typedef struct mca_btl_openib_eager_rdma_remote_t mca_btl_openib_eager_rdma_remote_t;
|
||||||
|
|
||||||
#define MCA_BTL_OPENIB_RDMA_FRAG(F) \
|
#define MCA_BTL_OPENIB_RDMA_FRAG(F) \
|
||||||
((F)->endpoint && \
|
((F)->type == MCA_BTL_OPENIB_FRAG_EAGER_RDMA)
|
||||||
(F)->endpoint->eager_rdma_local.reg && \
|
|
||||||
(F)->mr == (F)->endpoint->eager_rdma_local.reg->mr)
|
|
||||||
|
|
||||||
#define EAGER_RDMA_BUFFER_REMOTE (0)
|
#define EAGER_RDMA_BUFFER_REMOTE (0)
|
||||||
#define EAGER_RDMA_BUFFER_LOCAL (0xff)
|
#define EAGER_RDMA_BUFFER_LOCAL (0xff)
|
||||||
|
@ -1238,6 +1238,7 @@ void mca_btl_openib_endpoint_connect_eager_rdma(
|
|||||||
item->user_data = endpoint->eager_rdma_local.reg;
|
item->user_data = endpoint->eager_rdma_local.reg;
|
||||||
OBJ_CONSTRUCT(item, mca_btl_openib_recv_frag_eager_t);
|
OBJ_CONSTRUCT(item, mca_btl_openib_recv_frag_eager_t);
|
||||||
((mca_btl_openib_frag_t*)item)->endpoint = endpoint;
|
((mca_btl_openib_frag_t*)item)->endpoint = endpoint;
|
||||||
|
((mca_btl_openib_frag_t*)item)->type = MCA_BTL_OPENIB_FRAG_EAGER_RDMA;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPAL_THREAD_LOCK(&openib_btl->eager_rdma_lock);
|
OPAL_THREAD_LOCK(&openib_btl->eager_rdma_lock);
|
||||||
|
@ -75,6 +75,7 @@ static void mca_btl_openib_recv_frag_common_constructor(mca_btl_openib_frag_t* f
|
|||||||
static void mca_btl_openib_send_frag_eager_constructor(mca_btl_openib_frag_t* frag)
|
static void mca_btl_openib_send_frag_eager_constructor(mca_btl_openib_frag_t* frag)
|
||||||
{
|
{
|
||||||
frag->size = mca_btl_openib_component.eager_limit;
|
frag->size = mca_btl_openib_component.eager_limit;
|
||||||
|
frag->type = MCA_BTL_OPENIB_FRAG_EAGER;
|
||||||
mca_btl_openib_send_frag_common_constructor(frag);
|
mca_btl_openib_send_frag_common_constructor(frag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,12 +83,14 @@ static void mca_btl_openib_send_frag_eager_constructor(mca_btl_openib_frag_t* fr
|
|||||||
static void mca_btl_openib_send_frag_max_constructor(mca_btl_openib_frag_t* frag)
|
static void mca_btl_openib_send_frag_max_constructor(mca_btl_openib_frag_t* frag)
|
||||||
{
|
{
|
||||||
frag->size = mca_btl_openib_component.max_send_size;
|
frag->size = mca_btl_openib_component.max_send_size;
|
||||||
|
frag->type = MCA_BTL_OPENIB_FRAG_MAX;
|
||||||
mca_btl_openib_send_frag_common_constructor(frag);
|
mca_btl_openib_send_frag_common_constructor(frag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mca_btl_openib_recv_frag_max_constructor(mca_btl_openib_frag_t* frag)
|
static void mca_btl_openib_recv_frag_max_constructor(mca_btl_openib_frag_t* frag)
|
||||||
{
|
{
|
||||||
frag->size = mca_btl_openib_component.max_send_size;
|
frag->size = mca_btl_openib_component.max_send_size;
|
||||||
|
frag->type = MCA_BTL_OPENIB_FRAG_MAX;
|
||||||
mca_btl_openib_recv_frag_common_constructor(frag);
|
mca_btl_openib_recv_frag_common_constructor(frag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,6 +98,7 @@ static void mca_btl_openib_recv_frag_max_constructor(mca_btl_openib_frag_t* frag
|
|||||||
static void mca_btl_openib_recv_frag_eager_constructor(mca_btl_openib_frag_t* frag)
|
static void mca_btl_openib_recv_frag_eager_constructor(mca_btl_openib_frag_t* frag)
|
||||||
{
|
{
|
||||||
frag->size = mca_btl_openib_component.eager_limit;
|
frag->size = mca_btl_openib_component.eager_limit;
|
||||||
|
frag->type = MCA_BTL_OPENIB_FRAG_EAGER;
|
||||||
mca_btl_openib_recv_frag_common_constructor(frag);
|
mca_btl_openib_recv_frag_common_constructor(frag);
|
||||||
frag->ftr = (mca_btl_openib_footer_t*)((char*)frag->segment.seg_addr.pval
|
frag->ftr = (mca_btl_openib_footer_t*)((char*)frag->segment.seg_addr.pval
|
||||||
+ frag->size);
|
+ frag->size);
|
||||||
@ -104,6 +108,7 @@ static void mca_btl_openib_recv_frag_eager_constructor(mca_btl_openib_frag_t* fr
|
|||||||
static void mca_btl_openib_send_frag_frag_constructor(mca_btl_openib_frag_t* frag)
|
static void mca_btl_openib_send_frag_frag_constructor(mca_btl_openib_frag_t* frag)
|
||||||
{
|
{
|
||||||
frag->size = 0;
|
frag->size = 0;
|
||||||
|
frag->type = MCA_BTL_OPENIB_FRAG_FRAG;
|
||||||
mca_btl_openib_send_frag_common_constructor(frag);
|
mca_btl_openib_send_frag_common_constructor(frag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,14 @@ struct mca_btl_openib_eager_rdma_header_t {
|
|||||||
};
|
};
|
||||||
typedef struct mca_btl_openib_eager_rdma_header_t mca_btl_openib_eager_rdma_header_t;
|
typedef struct mca_btl_openib_eager_rdma_header_t mca_btl_openib_eager_rdma_header_t;
|
||||||
|
|
||||||
|
enum mca_btl_openib_frag_type_t {
|
||||||
|
MCA_BTL_OPENIB_FRAG_EAGER,
|
||||||
|
MCA_BTL_OPENIB_FRAG_MAX,
|
||||||
|
MCA_BTL_OPENIB_FRAG_FRAG,
|
||||||
|
MCA_BTL_OPENIB_FRAG_EAGER_RDMA
|
||||||
|
};
|
||||||
|
typedef enum mca_btl_openib_frag_type_t mca_btl_openib_frag_type_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IB send fragment derived type.
|
* IB send fragment derived type.
|
||||||
*/
|
*/
|
||||||
@ -75,7 +83,8 @@ struct mca_btl_openib_frag_t {
|
|||||||
mca_btl_base_segment_t segment;
|
mca_btl_base_segment_t segment;
|
||||||
struct mca_btl_base_endpoint_t *endpoint;
|
struct mca_btl_base_endpoint_t *endpoint;
|
||||||
size_t size;
|
size_t size;
|
||||||
int rc;
|
int rc;
|
||||||
|
mca_btl_openib_frag_type_t type;
|
||||||
union{
|
union{
|
||||||
struct ibv_recv_wr rd_desc;
|
struct ibv_recv_wr rd_desc;
|
||||||
struct ibv_send_wr sr_desc;
|
struct ibv_send_wr sr_desc;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user