Fix: umbp qp per transfer default value & add logs - #384
Merged
Conversation
TianDi101
commented
Jun 11, 2026
Collaborator
- Change default qpPerTransfer = 4 to avoid AINIC resource overflow
- Add logs for rdma transport implementation
There was a problem hiding this comment.
Pull request overview
This PR adjusts RDMA configuration defaults to mitigate AINIC resource exhaustion and improves observability for RDMA (ibverbs) resource-creation failures.
Changes:
- Switch UMBP RDMA
qpPerTransferto be env-configurable viaMORI_UMBP_QP_PER_TRANSFER, with a safer default of4(previously16). - Add error logs and replace
assert(...)with logged failures +std::runtime_errorthrows foribv_create_cq,ibv_create_qp, andibv_alloc_pdfailures.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/umbp/distributed/pool_client.cpp |
Makes qpPerTransfer configurable via env var with a reduced default to prevent RDMA resource overflow. |
src/application/transport/rdma/providers/ibverbs/ibverbs.cpp |
Adds detailed error logs and throws on ibverbs resource creation failures (CQ/QP/PD). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+76
to
+82
| if (!endpoint.ibvHandle.cq) { | ||
| MORI_APP_ERROR( | ||
| "ibv_create_cq failed: errno={} ({}); dev={} max_cqe={} dev_max_cqe={} cqs_in_pool={}", | ||
| errno, strerror(errno), GetRdmaDevice()->Name(), config.maxCqeNum, | ||
| deviceAttr->orig_attr.max_cqe, cqPool.size()); | ||
| throw std::runtime_error("ibv_create_cq failed: " + std::string(strerror(errno))); | ||
| } |
Comment on lines
+105
to
+114
| if (!endpoint.ibvHandle.qp) { | ||
| MORI_APP_ERROR( | ||
| "ibv_create_qp failed: errno={} ({}); dev={} port={} max_send_wr={} max_recv_wr={} " | ||
| "max_send_sge={} max_cqe={} dev_caps(max_qp_wr={} max_qp={} max_cqe={}) qps_in_pool={}", | ||
| errno, strerror(errno), GetRdmaDevice()->Name(), config.portId, qpAttr.cap.max_send_wr, | ||
| qpAttr.cap.max_recv_wr, qpAttr.cap.max_send_sge, config.maxCqeNum, | ||
| deviceAttr->orig_attr.max_qp_wr, deviceAttr->orig_attr.max_qp, | ||
| deviceAttr->orig_attr.max_cqe, qpPool.size()); | ||
| throw std::runtime_error("ibv_create_qp failed: " + std::string(strerror(errno))); | ||
| } |
Comment on lines
229
to
+233
| ibv_pd* pd = ibv_alloc_pd(defaultContext); | ||
| if (!pd) { | ||
| MORI_APP_ERROR("ibv_alloc_pd failed: errno={} ({}); dev={}", errno, strerror(errno), Name()); | ||
| throw std::runtime_error("ibv_alloc_pd failed: " + std::string(strerror(errno))); | ||
| } |
Collaborator
Author
|
Leave the review solved by the next PR, we need to merge this one to main for an urgent test |
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.