Dedicated Resource Manager, expose QueuePairs #272
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This Diff refactors RDMA codebase to have RmdaManagerActor to act as a dedicated resource manager for each endpoint; and manages memory mappings and related communicators (QueuePairs). Today this process is relatively simple (we are using CPU, and exposing entire address space to NIC), and assume one QueuePair per route (ie. all traffic from A<->B will go though same QP), but as we transition supporting GPUs it will get more complex, so cleaning up api and abstractions now will help.
In this new model, RdmaBuffer's are extremely light-weight and should only be created by RdmaManagerActors. Its worth highlighting the RmdaBuffer is really designed to move the minimum data to remote caller, under the hood, RmdaBuffers represent a slice of a Memory Region w/ a given rkey/lkey.
Moving buffers requires leveraging RmdaQueuePairs GET/PUT API; again to obtain an QP it must be requested from an RmdaManagerActor.
core API for RdmaManagerActor:
request_buffer(addr: u32, size: usize) -> RmdaBuffer. // This acts a light-weight memory handle that can be serialized. In practice this a slice of IBV MR maintained by RdmaManagerActor
Example API usage:
// setup envs, send remote_buffer -> local env.
// establish RMDA connection with Peer if required.
let qp = local_rmda_manager.request_queue_pair(client, remote_rmda_manager).await()?
// get/put api example, returns immediately.
qp.get(local_buffer, remote_buffer)?;
// ... poll for completion
Differential Revision: D76370567