hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8VV2H CVE: NA
----------------------------------------------------------
On Server scenarios cma is useless: 1) Kernel error logs of cma alloc failure often occur on ARM64 servers, but in reality, there is no impact as DMA allocation will fallback to the buddy system for memory allocation. 2) CMA also can cause slow DMA memory allocation if some is being used in user space. When the kernel wants to use it, it needs to migrate, causing a performance impact. 3) Currently, only a few users in the kernel require cma, such as the Android ION driver, which is obviously not used in server scenarios. The current openEuler defconfig specifies the default size through CONFIG_CMA_SIZE_MBYTES=64, which may not be enough for products that really need to use cma, making this default size somewhat useless.
This patch disable cma on arm64 by set CONFIG_CMA_SIZE_MBYTES=0, for product that denpend on cma, they also can enable it by adding kernel cmdline cma=xxx.
Signed-off-by: Nanyong Sun sunnanyong@huawei.com --- arch/arm64/configs/openeuler_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index 158a9f3bb8fd..e7ecdd8a12eb 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -7064,7 +7064,7 @@ CONFIG_DMA_PERNUMA_CMA=y # # Default contiguous memory area size: # -CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_CMA_SIZE_MBYTES=0 CONFIG_CMA_SIZE_SEL_MBYTES=y # CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set # CONFIG_CMA_SIZE_SEL_MIN is not set