Skip to content

UCT/RC: Add per-EP txqp_reserve for resource checks#11361

Open
michal-shalev wants to merge 1 commit intoopenucx:masterfrom
michal-shalev:uct-rc-txqp-reserve
Open

UCT/RC: Add per-EP txqp_reserve for resource checks#11361
michal-shalev wants to merge 1 commit intoopenucx:masterfrom
michal-shalev:uct-rc-txqp-reserve

Conversation

@michal-shalev
Copy link
Copy Markdown
Contributor

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_reserve field on uct_rc_ep_t and a parametrized UCT_RC_CHECK_TXQP_VALUE_RET(..., _value) macro.
On a failed resource check the macro bumps ep->txqp_reserve to max(current, _value), keeping the EP "out of resources" until at least _value slots are free.
The reservation is reset to 0 once the queued op is dispatched from the pending arbiter.
Existing UCT_RC_CHECK_TXQP_RET becomes a _value = 0 wrapper, so current behavior is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant