- don't track the sequence number when the endpoint is a data sink,
its not needed and there could be multiple sources each w/ their own sequence. - if a write doesn't complete, need to check for non-blocking case.. This commit was SVN r7795.
Этот коммит содержится в:
родитель
f9974f72e0
Коммит
d0cd752e33
@ -162,6 +162,8 @@ static void orte_iof_base_endpoint_write_handler(int sd, short flags, void *user
|
|||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
if(errno == EAGAIN)
|
if(errno == EAGAIN)
|
||||||
break;
|
break;
|
||||||
|
if(errno == EINTR)
|
||||||
|
continue;
|
||||||
orte_iof_base_endpoint_closed(endpoint);
|
orte_iof_base_endpoint_closed(endpoint);
|
||||||
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
||||||
return;
|
return;
|
||||||
@ -173,7 +175,6 @@ static void orte_iof_base_endpoint_write_handler(int sd, short flags, void *user
|
|||||||
}
|
}
|
||||||
opal_list_remove_item(&endpoint->ep_frags, &frag->super);
|
opal_list_remove_item(&endpoint->ep_frags, &frag->super);
|
||||||
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
||||||
orte_iof_base_endpoint_ack(endpoint, frag->frag_hdr.hdr_msg.msg_seq + frag->frag_hdr.hdr_msg.msg_len);
|
|
||||||
orte_iof_base_frag_ack(frag);
|
orte_iof_base_frag_ack(frag);
|
||||||
OPAL_THREAD_LOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_LOCK(&orte_iof_base.iof_lock);
|
||||||
}
|
}
|
||||||
@ -392,7 +393,6 @@ int orte_iof_base_endpoint_forward(
|
|||||||
}
|
}
|
||||||
|
|
||||||
OPAL_THREAD_LOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_LOCK(&orte_iof_base.iof_lock);
|
||||||
endpoint->ep_seq = hdr->msg_seq + hdr->msg_len;
|
|
||||||
frag->frag_owner = endpoint;
|
frag->frag_owner = endpoint;
|
||||||
frag->frag_src = *src;
|
frag->frag_src = *src;
|
||||||
frag->frag_hdr.hdr_msg = *hdr;
|
frag->frag_hdr.hdr_msg = *hdr;
|
||||||
@ -400,7 +400,7 @@ int orte_iof_base_endpoint_forward(
|
|||||||
/* try to write w/out copying data */
|
/* try to write w/out copying data */
|
||||||
if(opal_list_get_size(&endpoint->ep_frags) == 0) {
|
if(opal_list_get_size(&endpoint->ep_frags) == 0) {
|
||||||
rc = write(endpoint->ep_fd,data,len);
|
rc = write(endpoint->ep_fd,data,len);
|
||||||
if(rc < 0) {
|
if(rc < 0 && (errno != EAGAIN && errno != EINTR)) {
|
||||||
orte_iof_base_endpoint_closed(endpoint);
|
orte_iof_base_endpoint_closed(endpoint);
|
||||||
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
@ -419,9 +419,7 @@ int orte_iof_base_endpoint_forward(
|
|||||||
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
||||||
} else {
|
} else {
|
||||||
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
||||||
|
|
||||||
/* acknowledge fragment */
|
/* acknowledge fragment */
|
||||||
orte_iof_base_endpoint_ack(endpoint, frag->frag_hdr.hdr_msg.msg_seq + frag->frag_hdr.hdr_msg.msg_len);
|
|
||||||
orte_iof_base_frag_ack(frag);
|
orte_iof_base_frag_ack(frag);
|
||||||
}
|
}
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
@ -434,6 +432,7 @@ int orte_iof_base_endpoint_forward(
|
|||||||
* is now open, re-enable forwarding.
|
* is now open, re-enable forwarding.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
int orte_iof_base_endpoint_ack(
|
int orte_iof_base_endpoint_ack(
|
||||||
orte_iof_base_endpoint_t* endpoint,
|
orte_iof_base_endpoint_t* endpoint,
|
||||||
uint32_t seq)
|
uint32_t seq)
|
||||||
|
@ -38,7 +38,7 @@ OBJ_CLASS_DECLARATION(orte_iof_base_endpoint_t);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ORTE_IOF_BASE_SEQDIFF(s1,s2) \
|
#define ORTE_IOF_BASE_SEQDIFF(s1,s2) \
|
||||||
((s1 > s2) ? (s1 - s2) : (s1 + (ULONG_MAX - s2)))
|
((s1 >= s2) ? (s1 - s2) : (s1 + (ULONG_MAX - s2)))
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user