428 Star 1.6K Fork 1.6K

GVPopenEuler/kernel

 / 详情

【OLK-5.10】ARM64内核日志报cma分配失败的问题

已完成
缺陷
创建于  
2024-01-13 14:42

一、缺陷信息
输入图片说明

ARM64服务器上有时候会报cma分配失败的日志打印

【问题分析】

  1. ARM64服务器上时常出现cma alloc失败的内核错误日志,但是实际上并无影响,DMA分配时会再fallback到伙伴系统分配内存。通常需要建议使用cmdline加cma=0的方式来关闭cma
  2. cma分配慢的问题,如果cma有一些被用户态使用了,内核想用的时候需要迁移,就会很慢,会带来性能影响。
  3. 内核里cma目前只有极少数的使用者是刚需,比如安卓的ION驱动,但服务器场景显然不太可能用到。当然也有可能存在产品使用了cma的,这个可以让他们自己加cmdline开启。当前openEuler defconfig通过CONFIG_CMA_SIZE_MBYTES=64来指定默认大小,对于真正想用cma的产品来说,这个也不一定够用,因此这个默认大小实际很鸡肋。

【解决方案】
服务器场景设置CONFIG_CMA_SIZE_MBYTES为0,对于cma有特殊需求的用户,使用cmdline指定自己所需的大小

评论 (1)

孙南勇 创建了缺陷 1年前

Hi sun_nanyong, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers.

openeuler-ci-bot 添加了
 
sig/Kernel
标签
1年前
孙南勇 修改了描述 1年前
ci-robot 通过合并 Pull Request !3972: arm64: make cma=0 as default for openeuler任务状态待办的 修改为已完成 1年前

登录 后才可以发表评论

状态
负责人
项目
预计工期 (小时)
开始日期   -   截止日期
-
置顶选项
优先级
分支
参与者(2)
5329419 openeuler ci bot 1632792936 孙南勇-sun_nanyong
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助