[TE/TENT] Enable UB Transport in TENT on Kunpeng SuperNode (Phase 3)#2828
[TE/TENT] Enable UB Transport in TENT on Kunpeng SuperNode (Phase 3)#2828zchuango wants to merge 28 commits into
Conversation
Updated the UB Phase 3 Test Guide to clarify testing procedures, scope, and configuration for the UB_TENT branch. Enhanced sections on unit testing, integration testing, and common pitfalls.
There was a problem hiding this comment.
Code Review
This pull request integrates Kunpeng UB/URMA transport support into the TENT framework, introducing the UbTentTransport adapter, UbTentMetadataBridge, and a TENT control-plane bootstrap path (BootstrapUb RPC), alongside page-aligned memory registration and segment sharing across contexts. While the integration is comprehensive, several critical issues must be addressed: unregistering a segment leaves null pointers in local_tseg_list_ instead of erasing them, which can cause null dereferences; resetting failover_count to zero on submission failure risks infinite failover loops; the UB bootstrap callback is not cleared on uninstall, leading to potential use-after-free bugs; and submission failures do not properly roll back partially modified sub-batch states, which can corrupt subsequent retries. Additionally, <algorithm> should be explicitly included in ub_tent_transport.cpp.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Will be assessing these advice~ There's still a lot of work to be done before merging. |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Description
Overview
This PR continues the phased UB transport work for Mooncake Transfer Engine on the Kunpeng SuperNode.
Phase 1 introduced the initial
UbTransportand URMA endpoint implementation for the legacy Transfer Engine. Phase 2 added mock URMA support, unit tests, and CI/testing infrastructure for UB transport. This Phase 3 PR enables UB transport in TENT by adding a TENT-side UB transport adapter and the required control-plane integration.This PR is submitted early to make the UB-in-TENT integration visible for incremental review. The current scope is to make UB recognizable, selectable, bootstrappable, and usable from TENT while reusing the existing legacy
UbTransportdata path. Follow-up commits may further refine the memory allocation/alignment path, metadata abstraction, and deeper TENT-native integration.Related work:
Motivation
UB transport support already exists in the legacy Transfer Engine path, but TENT currently cannot select or drive UB as a first-class transport.
This prevents Kunpeng SuperNode UB hardware from being used through the newer TENT transport abstraction. To close this gap, this PR introduces a compatibility layer that maps TENT transport APIs, segment metadata, memory registration, transfer batches, bootstrap information, and status queries to the existing UB transport implementation.
The goal of this phase is not to rewrite the full URMA/UB data path. Instead, this PR provides a practical bridge so that UB can be used through TENT first, while leaving room for a more native TENT UB implementation later.
Major Changes
1. Add UB as a TENT transport type
This PR adds UB support to the TENT transport type system, including:
TransportType::UB"ub"string parsing in the TENT selectorThis allows TENT to recognize UB as a selectable transport type.
2. Add
UbTentTransportThis PR introduces
UbTentTransport, a TENT transport adapter for the existing legacyUbTransport.UbTentTransportimplements the TENT transport interface and delegates UB data path operations to the legacyUbTransport.It handles:
This keeps the existing URMA/UB data path mostly unchanged and limits this PR to the TENT integration layer.
3. Add
UbTentMetadataBridgeLegacy
UbTransportdepends on the oldTransferMetadatainterface, while TENT usesSegmentManagerand TENT-style segment descriptors.This PR adds
UbTentMetadataBridgeto bridge the two metadata systems. The bridge is responsible for:UbTransportThis allows the existing UB transport logic to work under the TENT segment management model.
4. Add UB bootstrap support to the TENT control plane
UB requires endpoint bootstrap information exchange before data transfer.
This PR adds a UB bootstrap path to the TENT control plane, including:
RpcFuncID::BootstrapUbControlClient::bootstrapUb()ControlService::onBootstrapUb()With this change, UB endpoint bootstrap can be performed through the TENT control-plane RPC path.
5. Fix UB device selection and
device_namepropagationThis PR fixes UB device selection in the TENT path.
Before this change,
device_namepropagation was incomplete for UB, which could cause UB to discover or select the wrong device even when the expected UB device was provided by configuration or benchmark parameters.This PR ensures that UB can use the configured device name, such as
bonding_dev_0, through the TENT configuration path.The intended selection order is:
transports/ub/device_nameMC_UB_DEVICE_NAMEThis makes dual-node UB/TENT testing and production deployment more deterministic.
6. Improve URMA memory registration and cleanup behavior
During UB/TENT integration, several URMA resource lifetime issues were found and fixed.
This PR improves:
urma_uninit()usage during per-context teardownThese changes make UB transport more stable in real URMA environments.
7. Add tests and documentation
This PR adds TENT UB related tests and documentation, covering:
The dual-node test path is documented in:
Scope
This PR focuses on enabling UB transport inside TENT by adapting the existing UB implementation.
This PR does not redesign the full UB data path and does not introduce a full TENT-native UB backend. It also does not change the existing TENT RDMA slice-spraying implementation.
The current implementation should be understood as a Phase 3 compatibility/integration layer:
UbTransport.Current Limitations and Follow-up Work
Memory alignment and allocator integration
The current implementation fixes URMA registration stability with page-aligned memory handling and primary-context registration/adoption.
As follow-up work, we will evaluate whether this page-alignment logic should be moved to or replaced by a common allocator. This would avoid keeping transport-specific allocation/alignment logic scattered inside the UB/TENT adapter path.
TENT slice spraying integration
TENT’s design intends slice spraying to be a transport-agnostic scheduling capability at the TENT layer. The current upstream implementation mainly provides RDMA-oriented QoS and slice spraying.
This PR does not yet integrate UB into the TENT-native slice scheduling path. UB is currently exposed as a selectable TENT transport while reusing the legacy UB data path.
A deeper integration with TENT slice scheduling/QoS can be evaluated in follow-up work once the UB backend is refactored away from the legacy
UbTransportadapter.Metadata abstraction cleanup
This PR makes selected
TransferMetadatamethods virtual so thatUbTentMetadataBridgecan provide the metadata and bootstrap behavior expected by legacyUbTransport.This is a practical bridge for Phase 3, but it is not necessarily the cleanest long-term abstraction. A future refactor may introduce a narrower UB metadata/handshake interface or decouple
UbTransportfrom the legacyTransferMetadatadependency.Native TENT UB backend
This PR is not a full TENT-native UB rewrite.
A native TENT UB backend, including deeper integration with TENT scheduling, QoS, and slice spraying, will be considered based on the evolution and stabilization of TENT transport/scheduler interfaces.
Module
mooncake-transfer-engine)mooncake-store)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Build with UB and TENT enabled
Run TENT UB unit tests
Run UB transport tests
Dual-node UB/TENT validation
This PR has been validated on a dual-node Kunpeng UB setup with real UB devices.
The validation covers:
device_namepropagationThe dual-node test procedure is documented in:
Test results
Checklist
./scripts/code_format.shpre-commit run --all-filesand all hooks passAI Assistance Disclosure
AI tools were used to help draft and polish the PR description. The implementation, testing, and final verification are the responsibility of the human submitter.