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

mm/hugetlb: Hugetlb use non-mirrored memory if hugepage_no_mirror is set

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

Reference: https://gitee.com/openeuler/kernel/commit/74bfdf157f1fd40b5d7966d1d94fcd690ad93a3e



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

Previous memory allocation in memblock for hugetlb may use mirrored or
non-mirrored memory depends on the system's memory status. However this is
not suitable if hugetlb user want to alloc memory from non-mirrored memory
if kernelcore=mirror is enabled.

In order to solve this problem, hugetlb use MEMBLOCK_NOMIRROR flag to alloc
memory from non-mirrored region without fallback to mirrored region.

Intel-SIG: mm/hugetlb: Hugetlb use non-mirrored memory
if hugepage_no_mirror is set

Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
[ jz: adapt to hugepage_no_mirror by checking "hugepage_no_mirror"
      instead of "mem_reliable_is_enabled()", and fix typo "min_addr" ]
Signed-off-by: default avatarJason Zeng <jason.zeng@intel.com>
parent 417d6693
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment