implemented priority
This commit was SVN r6499.
Этот коммит содержится в:
родитель
5a12889d4e
Коммит
20917f8db0
@ -650,16 +650,30 @@ int mca_btl_gm_send(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* post the send request */
|
/* post the send request */
|
||||||
gm_send_with_callback(
|
if(frag->base.des_flags & MCA_BTL_DES_FLAGS_PRIORITY &&
|
||||||
gm_btl->port,
|
frag->size == mca_btl_gm_component.gm_eager_frag_size) {
|
||||||
frag->hdr,
|
gm_send_with_callback(
|
||||||
frag->size,
|
gm_btl->port,
|
||||||
frag->segment.seg_len + sizeof(mca_btl_base_header_t),
|
frag->hdr,
|
||||||
GM_LOW_PRIORITY,
|
mca_btl_gm_component.gm_eager_frag_size,
|
||||||
endpoint->endpoint_addr.node_id,
|
frag->segment.seg_len + sizeof(mca_btl_base_header_t),
|
||||||
endpoint->endpoint_addr.port_id,
|
GM_HIGH_PRIORITY,
|
||||||
mca_btl_gm_send_callback,
|
endpoint->endpoint_addr.node_id,
|
||||||
frag);
|
endpoint->endpoint_addr.port_id,
|
||||||
|
mca_btl_gm_send_callback,
|
||||||
|
frag);
|
||||||
|
} else {
|
||||||
|
gm_send_with_callback(
|
||||||
|
gm_btl->port,
|
||||||
|
frag->hdr,
|
||||||
|
mca_btl_gm_component.gm_max_frag_size,
|
||||||
|
frag->segment.seg_len + sizeof(mca_btl_base_header_t),
|
||||||
|
GM_LOW_PRIORITY,
|
||||||
|
endpoint->endpoint_addr.node_id,
|
||||||
|
endpoint->endpoint_addr.port_id,
|
||||||
|
mca_btl_gm_send_callback,
|
||||||
|
frag);
|
||||||
|
}
|
||||||
|
|
||||||
if(opal_list_get_size(&gm_btl->gm_repost)) {
|
if(opal_list_get_size(&gm_btl->gm_repost)) {
|
||||||
mca_btl_gm_frag_t* frag;
|
mca_btl_gm_frag_t* frag;
|
||||||
|
@ -145,9 +145,9 @@ int mca_btl_gm_component_open(void)
|
|||||||
mca_btl_gm_module.super.btl_max_send_size =
|
mca_btl_gm_module.super.btl_max_send_size =
|
||||||
mca_btl_gm_param_register_int ("max_send_size", 64*1024);
|
mca_btl_gm_param_register_int ("max_send_size", 64*1024);
|
||||||
mca_btl_gm_module.super.btl_min_rdma_size =
|
mca_btl_gm_module.super.btl_min_rdma_size =
|
||||||
mca_btl_gm_param_register_int("min_rdma_size", 256*1024);
|
mca_btl_gm_param_register_int("min_rdma_size", 128*1024);
|
||||||
mca_btl_gm_module.super.btl_max_rdma_size =
|
mca_btl_gm_module.super.btl_max_rdma_size =
|
||||||
mca_btl_gm_param_register_int("max_rdma_size", 256*1024);
|
mca_btl_gm_param_register_int("max_rdma_size", 128*1024);
|
||||||
#if OMPI_MCA_BTL_GM_SUPPORT_REGISTERING && OMPI_MCA_BTL_GM_HAVE_RDMA_PUT
|
#if OMPI_MCA_BTL_GM_SUPPORT_REGISTERING && OMPI_MCA_BTL_GM_HAVE_RDMA_PUT
|
||||||
mca_btl_gm_module.super.btl_flags =
|
mca_btl_gm_module.super.btl_flags =
|
||||||
mca_btl_gm_param_register_int("flags", MCA_BTL_FLAGS_RDMA);
|
mca_btl_gm_param_register_int("flags", MCA_BTL_FLAGS_RDMA);
|
||||||
@ -273,8 +273,8 @@ mca_btl_gm_module_init (mca_btl_gm_module_t * btl)
|
|||||||
frag->base.des_src_cnt = 0;
|
frag->base.des_src_cnt = 0;
|
||||||
frag->base.des_dst = &frag->segment;
|
frag->base.des_dst = &frag->segment;
|
||||||
frag->base.des_dst_cnt = 1;
|
frag->base.des_dst_cnt = 1;
|
||||||
frag->priority = GM_LOW_PRIORITY;
|
frag->priority = GM_HIGH_PRIORITY;
|
||||||
gm_provide_receive_buffer(btl->port, frag->hdr, frag->size, GM_LOW_PRIORITY);
|
gm_provide_receive_buffer(btl->port, frag->hdr, frag->size, frag->priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=mca_btl_gm_component.gm_num_high_priority; i<btl->gm_max_recv_tokens; i++) {
|
for(i=mca_btl_gm_component.gm_num_high_priority; i<btl->gm_max_recv_tokens; i++) {
|
||||||
@ -288,7 +288,7 @@ mca_btl_gm_module_init (mca_btl_gm_module_t * btl)
|
|||||||
frag->base.des_dst = &frag->segment;
|
frag->base.des_dst = &frag->segment;
|
||||||
frag->base.des_dst_cnt = 1;
|
frag->base.des_dst_cnt = 1;
|
||||||
frag->priority = GM_LOW_PRIORITY;
|
frag->priority = GM_LOW_PRIORITY;
|
||||||
gm_provide_receive_buffer(btl->port, frag->hdr, frag->size, GM_LOW_PRIORITY);
|
gm_provide_receive_buffer(btl->port, frag->hdr, frag->size, frag->priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable rdma */
|
/* enable rdma */
|
||||||
@ -489,13 +489,11 @@ int mca_btl_gm_component_progress()
|
|||||||
unsigned char* buffer = (unsigned char*)gm_ntohp(event->recv.buffer);
|
unsigned char* buffer = (unsigned char*)gm_ntohp(event->recv.buffer);
|
||||||
mca_btl_gm_frag_t* frag = (mca_btl_gm_frag_t*)(buffer - sizeof(mca_btl_gm_frag_t));
|
mca_btl_gm_frag_t* frag = (mca_btl_gm_frag_t*)(buffer - sizeof(mca_btl_gm_frag_t));
|
||||||
mca_btl_base_header_t* hdr;
|
mca_btl_base_header_t* hdr;
|
||||||
uint32_t priority = GM_HIGH_PRIORITY;
|
|
||||||
|
|
||||||
/* If there are no receive events just skip the function call */
|
/* If there are no receive events just skip the function call */
|
||||||
switch(gm_ntohc(event->recv.type)) {
|
switch(gm_ntohc(event->recv.type)) {
|
||||||
case GM_FAST_RECV_EVENT:
|
case GM_FAST_RECV_EVENT:
|
||||||
case GM_FAST_PEER_RECV_EVENT:
|
case GM_FAST_PEER_RECV_EVENT:
|
||||||
priority = GM_LOW_PRIORITY;
|
|
||||||
case GM_FAST_HIGH_RECV_EVENT:
|
case GM_FAST_HIGH_RECV_EVENT:
|
||||||
case GM_FAST_HIGH_PEER_RECV_EVENT:
|
case GM_FAST_HIGH_PEER_RECV_EVENT:
|
||||||
{
|
{
|
||||||
@ -511,7 +509,6 @@ int mca_btl_gm_component_progress()
|
|||||||
}
|
}
|
||||||
case GM_RECV_EVENT:
|
case GM_RECV_EVENT:
|
||||||
case GM_PEER_RECV_EVENT:
|
case GM_PEER_RECV_EVENT:
|
||||||
priority = GM_LOW_PRIORITY;
|
|
||||||
case GM_HIGH_RECV_EVENT:
|
case GM_HIGH_RECV_EVENT:
|
||||||
case GM_HIGH_PEER_RECV_EVENT:
|
case GM_HIGH_PEER_RECV_EVENT:
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ do { \
|
|||||||
} else { \
|
} else { \
|
||||||
OPAL_THREAD_LOCK(&btl->gm_lock); \
|
OPAL_THREAD_LOCK(&btl->gm_lock); \
|
||||||
do { \
|
do { \
|
||||||
gm_provide_receive_buffer(btl->port, frag->hdr, frag->size, priority); \
|
gm_provide_receive_buffer(btl->port, frag->hdr, frag->size, frag->priority); \
|
||||||
} while (NULL != (frag = (mca_btl_gm_frag_t*)opal_list_remove_first(&btl->gm_repost))); \
|
} while (NULL != (frag = (mca_btl_gm_frag_t*)opal_list_remove_first(&btl->gm_repost))); \
|
||||||
OPAL_THREAD_UNLOCK(&btl->gm_lock); \
|
OPAL_THREAD_UNLOCK(&btl->gm_lock); \
|
||||||
} \
|
} \
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user