Enabling concurrent spilling#1048
Open
nirandaperera wants to merge 1 commit into
Open
Conversation
Signed-off-by: niranda perera <niranda.perera@gmail.com>
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.
[C++]Allow concurrentSpillManager::spill()invocationsSpillManagerserialized allspill()calls behind a singlestd::mutex, even though spill work is long-running (D2H copies, I/O) and only the rarely-touched function registry actually needed mutual exclusion. This switches the lock to astd::shared_mutexsospill()takes a shared lock and runs in parallel, whileadd_spill_function/remove_spill_functionstill take an exclusive lock — which preserves the drain-on-remove guarantee that callers likeShufflerrely on for safe teardown.spill()now takes a shared lock; concurrent callers no longer serialize on the registry mutex.add_spill_function/remove_spill_functiontake an exclusive lock, so in-flight spillers are drained before either returns.SpillManager.ConcurrentSpilltest that uses a rendezvous to provespill()calls actually overlap (it would fail on the old exclusive mutex).Shuffler::spill,AllGather::spill,spill_messages); all already lock their own state for concurrent self-invocation, so no caller-side changes are required.