-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JUCX: add request status field. #6021
Conversation
/** | ||
* The only request that doesn't have automatic status update (no callback) | ||
* so need to go into ucx to check it's real status | ||
*/ | ||
private boolean isCloseRequest = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have CB on close as well, for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there's no callback in ucp layer, we can't - since the user may not explicitly progress this request, but rely on the global progress thread, that just loops in progress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove it after #6036
updateRequestStatus(getNativeId()); | ||
} | ||
|
||
return (status != UcsConstants.STATUS.UCS_INPROGRESS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getStatus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's safe to use the status field, since it's class private. getStatus
will be inlined by JIT compiler at some point, but since this method is usually used in request progress loop, better to not rely on jit, IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Java_org_openucx_jucx_ucp_UcpRequest_updateRequestStatus(JNIEnv *env, | ||
jobject jucx_request, jlong ucp_req_ptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's formatted by clang:
-JNIEXPORT void JNICALL
-Java_org_openucx_jucx_ucp_UcpRequest_updateRequestStatus(JNIEnv *env,
- jobject jucx_request, jlong ucp_req_ptr)
+JNIEXPORT void JNICALL Java_org_openucx_jucx_ucp_UcpRequest_updateRequestStatus(
+ JNIEnv *env, jobject jucx_request, jlong ucp_req_ptr)
{
jucx_request_update_status(env, jucx_request,
ucp_request_check_status((void *)ucp_req_ptr));
Let me fix, so it doesn't touch java
ab06b46
to
0580ef0
Compare
What
Add status field to UcpRequest class.
Why ?
To check the status of the request.
splitting from #6019