Atomically increase the size of the req_bytes_sent.
Decrease and limit the locked part of the function. This commit was SVN r3638.
Этот коммит содержится в:
родитель
5c17dfda0e
Коммит
1dfcf38d3c
@ -150,8 +150,8 @@ void mca_pml_teg_send_request_progress(
|
|||||||
size_t bytes_sent)
|
size_t bytes_sent)
|
||||||
{
|
{
|
||||||
bool schedule = false;
|
bool schedule = false;
|
||||||
OMPI_THREAD_LOCK(&ompi_request_lock);
|
|
||||||
req->req_bytes_sent += bytes_sent;
|
ompi_atomic_add( &(req->req_bytes_sent), bytes_sent );
|
||||||
if (req->req_bytes_sent >= req->req_bytes_packed) {
|
if (req->req_bytes_sent >= req->req_bytes_packed) {
|
||||||
req->req_base.req_pml_complete = true;
|
req->req_base.req_pml_complete = true;
|
||||||
if (req->req_base.req_ompi.req_complete == false) {
|
if (req->req_base.req_ompi.req_complete == false) {
|
||||||
@ -161,7 +161,9 @@ void mca_pml_teg_send_request_progress(
|
|||||||
req->req_base.req_ompi.req_status._count = req->req_bytes_sent;
|
req->req_base.req_ompi.req_status._count = req->req_bytes_sent;
|
||||||
req->req_base.req_ompi.req_complete = true;
|
req->req_base.req_ompi.req_complete = true;
|
||||||
if(ompi_request_waiting) {
|
if(ompi_request_waiting) {
|
||||||
|
OMPI_THREAD_LOCK(&ompi_request_lock);
|
||||||
ompi_condition_broadcast(&ompi_request_cond);
|
ompi_condition_broadcast(&ompi_request_cond);
|
||||||
|
OMPI_THREAD_UNLOCK(&ompi_request_lock);
|
||||||
}
|
}
|
||||||
} else if (req->req_base.req_free_called) {
|
} else if (req->req_base.req_free_called) {
|
||||||
MCA_PML_TEG_FREE((ompi_request_t**)&req);
|
MCA_PML_TEG_FREE((ompi_request_t**)&req);
|
||||||
@ -169,7 +171,6 @@ void mca_pml_teg_send_request_progress(
|
|||||||
/* test to see if we have scheduled the entire request */
|
/* test to see if we have scheduled the entire request */
|
||||||
} else if (req->req_offset < req->req_bytes_packed)
|
} else if (req->req_offset < req->req_bytes_packed)
|
||||||
schedule = true;
|
schedule = true;
|
||||||
OMPI_THREAD_UNLOCK(&ompi_request_lock);
|
|
||||||
|
|
||||||
/* schedule remaining fragments of this request */
|
/* schedule remaining fragments of this request */
|
||||||
if(schedule) {
|
if(schedule) {
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user