已合并
Remove the unnecessary heaplist rescan in svm VA alloc #60
Remove the unnecessary heaplist rescan in svm VA alloc #60
已合并
tusdinbo创建于 4月3日
tusdinbo
4月3日

描述

当前SVM分配器在锁从读锁升级到写锁时,会重新扫描整个heaplist中的所有heap。这个重新扫描是为了避免在多线程请求分配时可能造成的冗余新堆为问题。但是在大多数情况下这个重新扫描是不必要且非常耗时的。
本提交在devmm_heap_list结构体中引入版本version。在锁升级后通过比较version可以跳过heaplist没有更新并且锁升级期间没有内存释放场景下对整个heaplist全堆重扫的操作,该重扫为冗余操作且在堆分配较多时非常耗时。本改动在高并发场景下可以极大提升原堆无法分配需要分配新堆时的分配性能。

关联的Issue

测试

文档更新

类型标签

  • Bug修复
  • 新特性
  • 性能优化
  • 文档更新
  • 其他,请描述:
    Signed-off-by: Yu Li liyu173@huawei.com
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 tusdinbo 的贡献)
Ttusdinbo
4月3日 创建了 pull request,commit a1c48e6d
CANN-robot
CANN-robot成员
4月3日 评论:

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


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
repo-cann/driver linyt_86, 冯呈祥 (2/2) linyt_86 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
4月3日 将lishengvictor,linyt_86,qili93,tangguijin,yanmingxiang,ad_cx,Panyuyuan,yangxiaoyuan,rubickrt1,xxwyhq0,StarMickey33,fangtianwei2025设为评审人
CANN-robotCANN-robot成员
4月3日 将lishengvictor,linyt_86,qili93,tangguijin,yanmingxiang,ad_cx,Panyuyuan,yangxiaoyuan,rubickrt1,xxwyhq0,StarMickey33,fangtianwei2025设为审查人
CANN-robotCANN-robot成员
4月3日 添加了label:cann-cla/no
此处折叠了76条消息 查看更多
CANN-robot
CANN-robot成员
24 天前 评论:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
CANN-robot
CANN-robot成员
24 天前 评论:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
CANN-robot
CANN-robot成员
24 天前 评论:
流水线 PR-pipeline_cann_driver#370 [ commitID:a0a4781f ] 已完成
likedislike
linyongtianlinyongtian成员
24 天前 解决了最后一个问题
CANN-robotCANN-robot成员
24 天前 合入了pull request