Skip to content

[Bugfix][TENT] Split oversized UB memory registrations - #64

Open
Connor-Matthew wants to merge 3 commits into
mainfrom
fix/tent-ub-chunked-registration
Open

Connor-Matthew wants to merge 3 commits into
mainfrom
fix/tent-ub-chunked-registration

Conversation

@Connor-Matthew

Copy link
Copy Markdown

Description

Classic UB gained large-buffer registration in kvcache-ai#5873. Native TENT UB still registered the whole range as a single URMA segment, so a buffer above the provider's segment limit could not be registered. This PR extends native TENT UB independently: it uses MC_MAX_SEG_SIZE to split physical registrations while keeping a single caller-visible buffer, splits requests at both peers' chunk boundaries, and keeps the still-owned handles on partial cleanup. Single-chunk metadata retains its existing format. Both peers need this version for multi-chunk UB buffers.

Suggested Merge Priority

  • P2 — Normal

Module

  • Transfer Engine (mooncake-transfer-engine)

Type of Change

  • Bug fix

How Has This Been Tested?

  • Linux ARM64 Docker: tent_ub_core_test, tent_ub_teardown_test, tent_ub_native_data_path_test, and tent_ub_loopback_engine_test passed. With a mocked URMA segment cap, the baseline rejects the oversized registration and the fix verifies every byte of READ and WRITE across different local and remote chunk boundaries.
  • The real adapter was syntax-checked, not exercised on hardware. The HugeTLB test skipped because no 2 MiB pages were reserved in the Docker VM.

Checklist

  • The fix commit includes the contributor's DCO sign-off.
  • Changed-line clang-format and scoped pre-commit checks passed.
  • Added regression tests.

AI Assistance Disclosure

  • AI tools were used to compare the Classic and TENT paths, draft the implementation and tests, and assist with validation.

@github-actions github-actions Bot added Transfer Engine size/M 100-1000 changed lines (additions + deletions) labels Nov 30, 2026
- Resolve remote UB chunk metadata outside lifecycle_mutex, grouped by target_id and deduplicated per remote buffer, so cache misses or refresh RPCs cannot block transport operations.
- Keep batch isolation in submitTransferTasks by falling back to regular slicing for individually unresolved local/remote requests so UbWorkers handles per-task failure/retry without failing valid sibling requests.
- Align ImportedSegmentRef::buffer_base/buffer_length with the selected chunk (matching LocalSegmentRef) and clear output vector in localChunkEnds.
- Extract planBufferChunks() and add deterministic tests for HugeTLB/mixed-VMA seam alignment, post-split max_slices_per_task enforcement, warmupMemory cap, and mixed-batch isolation.

Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
@github-actions github-actions Bot added size/L 1001+ changed lines (additions + deletions) and removed size/M 100-1000 changed lines (additions + deletions) labels Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci size/L 1001+ changed lines (additions + deletions) Transfer Engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant