Commit 8525dfb2 authored by Ma Wupeng's avatar Ma Wupeng Committed by Wang Wensheng
Browse files

mm/memblock: Introduce ability to alloc memory from specify memory reigon

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S


CVE: NA

--------------------------------

With mirrored feature enabled, memblock will prefer to alloc memory from
mirrored memory in any case. Since mirrored region and non-mirrored region
may have different capacity or bandwidth, memblock user may choose which
region to alloc memory rather than choose the mirrored one by default.

To solve this problem, flag MEMBLOCK_NOMIRROR is introduced to alloc memory
from non-mirrored region. Function memblock_alloc_range_nid_flags() is
introduced to alloc memory with specify flag without fallback.

Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
parent b9b3aaad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment