提交 94ee86c7 编写于 作者: C Chen Wandun 提交者: Yang Yingliang

mm/vmscan: dont reclaim anon page when shrink page cache

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S
CVE: NA

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

The number of page cache should be limited in a range if
enable CONFIG_MEMORY_RELIABLE, so only page cache instead
of both file + anono page should be reclaimed during page
cache reclaimtion.
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 04ec8364
......@@ -56,6 +56,7 @@
#include <linux/swapops.h>
#include <linux/balloon_compaction.h>
#include <linux/mem_reliable.h>
#include "internal.h"
......@@ -3968,7 +3969,7 @@ static unsigned long __shrink_page_cache(gfp_t mask)
.nr_to_reclaim = SWAP_CLUSTER_MAX *
(unsigned long)vm_cache_reclaim_weight,
.may_unmap = 1,
.may_swap = 1,
.may_swap = mem_reliable_is_enabled() ? 0 : 1,
.order = 0,
.priority = DEF_PRIORITY,
.target_mem_cgroup = NULL,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册