mm: Introduce watermark check for memory reliable
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA ---------------------------------------------- Introuce min watermark to ensure kernel can use this reserved memory. This watermark will prevent special user tasks, pagecache, tmpfs user from using too many mirrored memory which will lead to kernel oom. Memory allocation with ___GFP_RELIABILITY or special user tasks will be blocked after this watermark is reached. This memory allocation will fallback to non-mirrored region or trigger oom depends on memory reliable fallback's status. This limit can be set or access via /proc/sys/vm/reliable_reserve_size. The default value of this limit is 256M. This limit can be set from 256M to the total size of mirrored memory. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Reviewed-by: Kefeng Wang<wangkefeng.wang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录