[https://nvbugs/6104831][fix] disagg buffer-pool RAII and NIXL agent lifetime fixes#14739
Closed
chienchunhung wants to merge 1 commit into
Closed
[https://nvbugs/6104831][fix] disagg buffer-pool RAII and NIXL agent lifetime fixes#14739chienchunhung wants to merge 1 commit into
chienchunhung wants to merge 1 commit into
Conversation
…lifetime fixes Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Collaborator
Author
|
/bot run --disable-fail-fast |
Collaborator
|
PR_Github #51013 [ run ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #51013 [ run ] completed with state
|
Collaborator
Author
|
/bot run --disable-fail-fast |
Collaborator
|
PR_Github #51114 [ run ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #51114 [ run ] completed with state |
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.
Summary
Carves out the disagg KV transfer lifetime and buffer-pool hygiene fixes from PR #13713 into a smaller, mergeable change. All three components close pre-existing hazards that exist today independent of in-flight cancellation.
What this PR changes (all ports from PR #13713)
wait_forslice on the buffer-acquire CV:kBufferAcquireSliceMs = 100, with the acquire loop callingmBuffersCV.wait_for(lk, slice)instead of an unboundedwait. Same pattern as PR #13713's "Cap disagg KV polling wait_for slice" applied to the buffer-acquire site.baseTransBuffer.{h,cpp}BufferIndexHolderRAII class that owns an acquired buffer-pool index and releases it on destruction, plus wiring at the four acquisition sites in the formatters and the recv-side flow indataTransceiver.cpp(withdetach()for the formatter happy-path handoff).baseTransBuffer.{h,cpp},cacheFormatter.cpp,mlaCacheFormatter.cpp,dataTransceiver.cppnb::keep_alive<0, 1>()annotation on the NIXL agent's nanobind binding so the agent stays alive while its returnedTransferStatusexists.nixl_utils/agentBindings.cppIssues these resolve independent of in-flight cancellation
TransferStatusstill holds a non-owning reference to it. Subsequent operations on theTransferStatuswould dereference freed memory. The nanobind keep-alive annotation ties the agent's Python-side lifetime to theTransferStatusit returned.What this PR explicitly excludes
shared_ptr<LlmRequest>ownership formSenderFutures/mRequesterFutures. Touches a wider API surface; planned for a follow-up so this PR stays focused on the buffer-pool / agent lifetime fixes.setKvCacheTransferStartinrequestAndReceiveAsync. Not in scope.