UCT/RC: Add per-EP txqp_reserve for resource checks#11361
Open
michal-shalev wants to merge 1 commit intoopenucx:masterfrom
Open
UCT/RC: Add per-EP txqp_reserve for resource checks#11361michal-shalev wants to merge 1 commit intoopenucx:masterfrom
michal-shalev wants to merge 1 commit intoopenucx:masterfrom
Conversation
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.
What?
Add a mechanism for a UCT RC EP to reserve N free TX QP slots, so that
uct_rc_ep_has_tx_resources()only reports resources once at least N slots are available.Why?
Preparation for ops that need multiple WQEs (e.g. SGL zcopy), which must reserve N free TX slots up-front to avoid partial dispatch.
A per-EP dynamic reservation only costs capacity on EPs with a pending multi-WQE op, unlike a static iface-wide reservation.
How?
Add a per-EP
txqp_reservefield onuct_rc_ep_tand a parametrizedUCT_RC_CHECK_TXQP_VALUE_RET(..., _value)macro.On a failed resource check the macro bumps
ep->txqp_reservetomax(current, _value), keeping the EP "out of resources" until at least_valueslots are free.The reservation is reset to 0 once the queued op is dispatched from the pending arbiter.
Existing
UCT_RC_CHECK_TXQP_RETbecomes a_value = 0wrapper, so current behavior is unchanged.