-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @zhengzengkai Memory reliable feature is a memory tiering mechanism. It is based on kernel mirror feature, which splits memory into two sperate regions, mirrored(reliable) region and non-mirrored (non-reliable) region. for kernel mirror feature: allocate kernel memory from mirrored region by default allocate user memory from non-mirrored region by default non-mirrored region will be arranged into ZONE_MOVABLE. for kernel reliable feature, it has additional features below: normal user tasks never alloc memory from mirrored region with userspace apis(malloc, mmap, etc.) special user tasks will allocate memory from mirrored region by default tmpfs/pagecache allocate memory from mirrored region by default upper limit of mirrored region allcated for user tasks, tmpfs and pagecache Support Reliable fallback mechanism which allows special user tasks, tmpfs and pagecache can fallback to alloc non-mirrored region, it's the default setting. In order to fulfil the goal ___GFP_RELIABILITY flag added for alloc memory from mirrored region. the high_zoneidx for special user tasks/tmpfs/pagecache is set to ZONE_NORMAL. normal user tasks could only alloc from ZONE_MOVABLE. This patch is just the main framework, memory reliable support for special user tasks, pagecache and tmpfs has own patches. To enable this function, mirrored(reliable) memory is needed and "kernelcore=reliable" should be added to kernel parameters. Link:https://gitee.com/openeuler/kernel/pulls/79 Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>79882b23