• M
    mm: Introduce fallback mechanism for memory reliable · 3023a4b3
    Ma Wupeng 提交于
    hulk inclusion
    category: feature
    bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S
    CVE: NA
    
    --------------------------------
    
    Introduce fallback mechanism for memory reliable. The following process
    will fallback to non-mirrored region if their allocation from mirrored
    region failed
    
    - User tasks with reliable flag
    - thp collapse pages
    - init tasks
    - pagecache
    - tmpfs
    
    In order to achieve this goals. Buddy system will fallback to non-mirrored
    in the following situations.
    
    - if __GFP_THISNODE is set in gfp_mask and dest nodes do not have any zones
      available
    
    - high_zoneidx will be set to ZONE_MOVABLE to alloc memory before oom
    
    This mechanism is enabled by defalut and can be disabled by adding
    "reliable_debug=F" to the kernel parameters. This mechanism rely on
    CONFIG_MEMORY_RELIABLE and need "kernelcore=reliable" in the kernel
    parameters.
    Signed-off-by: NMa Wupeng <mawupeng1@huawei.com>
    Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    3023a4b3
page_alloc.c 236.2 KB