[Feat] Optimize ASU task manager with lock-free slots#980
Open
AooooooA-C wants to merge 1 commit into
Open
Conversation
ccc6276 to
f31431a
Compare
nrj868
reviewed
May 27, 2026
f31431a to
5f5e5c3
Compare
ygwpz
reviewed
May 28, 2026
ygwpz
reviewed
May 28, 2026
78c673f to
07bcf88
Compare
ygwpz
reviewed
Jun 1, 2026
ygwpz
reviewed
Jun 1, 2026
ygwpz
reviewed
Jun 1, 2026
nrj868
reviewed
Jun 1, 2026
nrj868
reviewed
Jun 1, 2026
0aa5709 to
6ff7321
Compare
Infinite666
reviewed
Jun 2, 2026
Infinite666
reviewed
Jun 2, 2026
6ff7321 to
1174e6b
Compare
ygwpz
reviewed
Jun 4, 2026
ygwpz
reviewed
Jun 4, 2026
27dec4a to
1ef17e2
Compare
1ef17e2 to
060c796
Compare
nrj868
approved these changes
Jun 5, 2026
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
This PR replaces the mutex-protected
unordered_mapinTaskManagerBasewith a fixed-size slot table based on open addressing and atomic state transitions. The goal is to reduce global lock contention.Modifications
The original implementation:
is replaced by a fixed-size slot array:
Each slot stores:
Test
1. Create and enter the build directory
2. Configure CMake
3. Build the asu.test target
4. Run the tests
./ucm/transport/kv/asu/asu.test --gtest_also_run_disabled_tests --gtest_filter='TransportTaskManagerTest*:ClientTaskManagerTest*:TaskManagerBaseBench*:SlotTaskManagerBaseBench*'5. Test Results
Unit tests for SlotTaskManagerBase verifying submit/get/remove/getAll correctness:

Benchmark: TaskManagerBase (mutex + unordered_map) vs SlotTaskManagerBase (lock-free slots + IndexPool)
