Commit 96f70fb8 authored by Nanyong Sun's avatar Nanyong Sun
Browse files

arm64: make cma=0 as default for openeuler

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: default avatarNanyong Sun <sunnanyong@huawei.com>
parent 6d9d4951
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment