Commit c3e01ea4 authored by Ma Wupeng's avatar Ma Wupeng Committed by Jason Zeng
Browse files

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

openEuler inclusion
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I7V2E8
CVE: NA

Reference: https://gitee.com/openeuler/kernel/commit/8525dfb2d97677baa0781233a029a52c67ccb723



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

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.

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

Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
[ jz: amend commit log ]
Signed-off-by: default avatarJason Zeng <jason.zeng@intel.com>
parent a3788a37
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment