[Feat] AsuClient modifies the process of registration - #1135
Open
Fengli5355 wants to merge 2 commits into
Open
Conversation
Fengli5355
requested review from
Infinite666,
Wwwzff,
harrisonyhq,
mag1c-h,
nrj868 and
ygwpz
as code owners
July 21, 2026 05:00
yuanzhg078
reviewed
Jul 21, 2026
| MRHandle mrHandle; | ||
| }; | ||
|
|
||
| virtual std::vector<Status> UnbindMemory(const std::vector<UnbindMemoryDesc>& memoryDescs) = 0; |
Contributor
There was a problem hiding this comment.
You can pass the mrHandle directly here; there is no need to use UnbindMemoryDesc.
yuanzhg078
reviewed
Jul 21, 2026
| "asuId=" + std::to_string(id)); | ||
| } | ||
| } else { | ||
| auto status = iter->second->UnregisterRegions(handles); |
Contributor
There was a problem hiding this comment.
When a follower unbind fails, finalStatus is already non-OK, but the owner is still unregistered; since the cache is not removed afterward, registeredResources_ retains a handle that is no longer valid on the owner.
Infinite666
reviewed
Jul 22, 2026
Remove boundRegisteredRegionHandles_
yuanzhg078
reviewed
Jul 23, 2026
| std::lock_guard<std::mutex> lock(registeredRegionsMu_); | ||
| std::vector<MRHandle> boundHandles; | ||
| boundHandles.reserve(boundRegisteredRegionHandles_.size()); | ||
| for (const auto& item : boundRegisteredRegionHandles_) { |
Contributor
There was a problem hiding this comment.
boundRegisteredRegionHandles_ duplicates information already stored in registeredRegions_: the bound local handle is available as registeredRegions_[ownerHandle].handle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Adapt AsuClient to senarios where there are multiple ASUs.
For temprary implementation, the very first transport (ASU) does the actual registering and unregistering; the followers does binding and unbinding to avoid redundant operations.
In the future, we plan to remove the owner transport and let Client chooses which transport does the action of reg and unreg. This needs several modifications or refactors in AIV / AICPU TransProvider.
Modifications
Test
Only for discussion in this stage.