已合并
fix CQ overflow #4953
hu-yiliang11创建于 29 天前
fix CQ overflow #4953
已合并
hu-yiliang11创建于 29 天前
hu-yiliang11
29 天前

描述

修改A2A3单边通信,RDAM场景下一次Batch接口只生成一次CQE

变更类型

请选择本次引入的变更类型:

关联的Issue

https://gitcode.com/cann/hcomm/issues/822

测试

已完成的测试用例和场景:
1.
2.

补充的UT用例:

文档更新

合入检查

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 hu-yiliang11 的贡献)
Hhu-yiliang11
29 天前 创建了 pull request,commit ee2fdf41
atomgit-bot
atomgit-bot
29 天前 评论:

变更摘要

本 PR 旨在修复 CQ(完成队列)溢出问题:修改 A2A3 单边通信逻辑,使 RDMA 场景下一次 Batch 接口只生成一次 CQE。核心做法是收紧 send_flags/sendFlags 的设置条件,仅在需要(数据通知类型或显式加 fence)时才给 WR 打上信号标志,避免每次收发都产生 CQE 造成队列积压溢出;同时调整了相关调试日志以输出 send_flags 便于定位。

主要改动

  • 收紧 AddWrList 的发送标志: 在 transport_device_ibverbs.cc 的 TransportDeviceIbverbs::AddWrList 中,sendFlags 由无条件设置 RA_SEND_SIGNALED 改为仅当 wqeType == WqeType::WQE_TYPE_DATA_NOTIFY 时设置 RA_SEND_SIGNALED,否则为 0,从而只对数据通知类型的 WQE 产生 CQE。
  • 调整 RdmaPostSend 的 CQE 回复条件: 在 transport_device_roce_mem.cc 的 TransportDeviceRoceMem::RdmaPostSend 中,send_flags 由"仅最后一个 WR 设置 IBV_SEND_SIGNALED"改为仅当 fence 时设置 (IBV_SEND_SIGNALED | IBV_SEND_FENCE),即只有加 fence 时才回复 CQE,并更新调试日志补充输出 send_flags。
  • 固定 TransportRdmaWithType 的 sendFlags 为 0: 在 transport_roce_mem.cc 的 TransportRoceMem::TransportRdmaWithType 中,wr[0].sendFlags 由按剩余字节数(remainingBytes > MAX_RDMA_WQE_SIZE ? 0 : RA_SEND_SIGNALED)条件设置改为固定为 0,避免每次 Batch 调用产生多余 CQE;同时更新 AddOpFence 等处的调试日志以输出 sendFlags。
likedislike
不准确?
atomgit-bot
atomgit-bot
29 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
29 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
29 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
src/legacy/ascend910/platform ✅ 陈浩, 陈量 (2/2) ✅ 陈浩 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

gcw_NcEfY7mt, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
此处折叠了46条消息 查看更多
陈浩
陈浩成员
28 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
28 天前 添加了label:approved
chenliang267
chenliang267成员
28 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
28 天前 添加了label:lgtm
CANN-robotCANN-robot成员
28 天前 合入了pull request