-
Notifications
You must be signed in to change notification settings - Fork 183
Advanced request handling optimizations #1009
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 Hi iyastreb! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
|
/build |
|
/build |
| if (__builtin_expect(result.req != nullptr, 1)) { | ||
| ucp_request_free(result.req); | ||
| } | ||
| result.req = req; |
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.
how do we use this request? It can be returned to memory pool by UCX at any moment after the free
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.
As you can see we don't use freed request at all.
Instead, the idea is to keep the LAST pending (or incomplete) request. So when we detect that current request is in pending state, we free the previously stored pending request (cause now we have a more recent one), and remember the recent one.
Later on we use this last pending request in "waiting for completion" stage (checkXfer/status) in order to:
- detect whether request completed
- error handling
In both cases, request is returned back to the UCX (either in status() -> worker->reqRelease() or in release() -> worker->reqRelease())
What?
This is a continuation of request handling optimization effort started in #982
In this PR 2 things are optimized:
Performance results
In nixlbench post time decreases 10x for RDMA batch 64k messages of 512B
PR1: #982
PR2: this PR