Skip to content
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

Closed

Conversation

petro-rudenko
Copy link
Member

What

Add status field to UcpRequest class.

Why ?

To check the status of the request.

splitting from #6019

Comment on lines 25 to 29
/**
* 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;
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Member Author

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getStatus

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Comment on lines 10 to 11
Java_org_openucx_jucx_ucp_UcpRequest_updateRequestStatus(JNIEnv *env,
jobject jucx_request, jlong ucp_req_ptr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap lines

Copy link
Member Author

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));

https://dev.azure.com/ucfconsort/ucx/_build/results?buildId=11689&view=logs&jobId=cc064a77-22b5-56bf-ecc0-70b5fe764261&j=cc064a77-22b5-56bf-ecc0-70b5fe764261&t=aedfd754-44a6-53e6-6843-8659d800fee2

Let me fix, so it doesn't touch java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants