提交 18849ae6 编写于 作者: C Chen Wandun 提交者: Yang Yingliang

mm/vmscan: fix frequent call of shrink_page_cache_work

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

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

If vmcache_reclaim_s > 120, it will call shrink_page_cache_work
after 120 seconds even shrinking is hard, that is shorter than
vmcache_reclaim_s, deviating from the original intention of extending
the interval.

In order to solve this, shrink_page_cache_work should be call
after vmcache_reclaim_s + 120.
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 c05f56c6
......@@ -4053,7 +4053,7 @@ static void shrink_page_cache_work(struct work_struct *w)
nr_pages = shrink_page_cache(GFP_KERNEL);
if ((nr_pages < SWAP_CLUSTER_MAX) && vm_cache_reclaim_enable)
queue_delayed_work_on(smp_processor_id(), system_wq, work,
round_jiffies_relative(120 * HZ));
round_jiffies_relative((vm_cache_reclaim_s + 120) * HZ));
}
static void shrink_page_cache_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册