Skip to content
Snippets Groups Projects
Commit 6b320574 authored by Christopher Haine's avatar Christopher Haine
Browse files

fix timely rdma completion

parent 1d4ab5ad
Branches
No related tags found
No related merge requests found
Pipeline #72343 failed
......@@ -421,12 +421,22 @@ mstro_transport_rdma_cb(mstro_event ev, void* closure)
// mark readiness for (the transport thread and then) the local pool
// there is only one waiter (the transport thread) for one CDO transfer completion
regentry->done = 1;
/* regentry->done = 1;
err = pthread_cond_signal(&(regentry->cond));
if (err) {
ERR("Couldn't signal (errno: %d)\n", err);
args->status = MSTRO_FAIL;
}
*/
/* indicate that CDO is filled */
mstro_cdo cdo;
mstro_cdo__find_cdo(&(args->cdoid), &cdo);
mstro_status s = mstro_cdo__mark_transfer_complete(cdo);
if(s!=MSTRO_OK) {
ERR("Failed to indicate completion of incoming CDO: %d (%s)\n",
s, mstro_status_description(s));
}
DEBUG("RDMA transport for CDO `%s` successful\n", args->name);
}
......
......@@ -526,7 +526,18 @@ mstro_transport_execute(
ERR("RDMA transfer completion message does not map to a documented transfer on destination\n");
return MSTRO_FAIL;
}
/*
pthread_mutex_lock(&(regentry->lock));
while (regentry->done == 0) {
int err = pthread_cond_wait(&(regentry->cond), &(regentry->lock));
if (err) {
ERR("Couldn't cond wait (errno: %d)\n", err);
return MSTRO_FAIL;
}
}
pthread_mutex_unlock(&(regentry->lock));
*/
} else {
/* indicate that CDO is filled */
s = mstro_cdo__mark_transfer_complete(cdo);
......@@ -534,6 +545,7 @@ mstro_transport_execute(
ERR("Failed to indicate completion of incoming CDO: %d (%s)\n",
s, mstro_status_description(s));
}
}
} else {
ERR("Unexpected CDO state %s: %d -- unsolicted incoming transfer?\n",
cdo->name, cdo->state);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment