Add to MULTI_POLL backend the execution-time dispatch pattern SHARED_QUEUE - #1062
Open
kingcrimsontianyu wants to merge 17 commits into
Open
kingcrimsontianyu wants to merge 17 commits into
kingcrimsontianyu wants to merge 17 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
4 tasks
kingcrimsontianyu
force-pushed
the
multi-first-avail
branch
from
September 16, 2026 13:26
acc85e6 to
f28c51c
Compare
Contributor
Author
|
/ok to test |
Contributor
Author
|
/ok to test |
Contributor
Author
Performance result
cudf-polarsPresto GPU |
kingcrimsontianyu
marked this pull request as ready for review
September 20, 2026 03:03
| } | ||
|
|
||
| void MultiPollReactor::admit_from_pool(AdmitPass& pass) | ||
| { |
Contributor
Author
There was a problem hiding this comment.
This function is the key part of this PR. Under the SHARED_QUEUE mode, the work assignment is now done at execution-time instead of submission-time. The queue wants to hand a total of share=queue-size / reactor-count (rounded up) works to each reactor, and the actual number of works accepted by a reactor depends collectively on the value of share, the reactor-private concurrency cap, and the per-(reactor, cuda context) bounce buffer cap.
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.
This PR has 2 major parts:
A third dispatch mode
KVIKIO_REMOTE_IO_REACTOR_DISPATCH=SHARED_QUEUEis added to theMULTI_POLLbackend. In this mode, sub-ranges wait in one pool-wide queue, and a reactor pulls one only after reserving a concurrency slot for it. This way the work binds to a reactor at execution time instead of at submission time. The mode requires a non-zeroKVIKIO_REMOTE_IO_MAX_CONCURRENT_REQUESTSand falls back toPER_CHUNKwithout one. This mode improves TPC-H performance for both Polars and Presto, shown in the section below Add to MULTI_POLL backend the execution-time dispatch pattern SHARED_QUEUE #1062 (comment).The reactor loop has now become quite complex, as it incorporates several key logic in a flat pattern, such as concurrency restriction, device copy, retry mechanism, shared queue dispatch, etc. This PR completely reorganizes the reactor loop for improved readability. Comments are modified by AI agent for better clarity.