
From: Chen Wandun <chenwandun@huawei.com> 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: Chen Wandun <chenwandun@huawei.com> Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 67f72f4d9daef..208ee8653da62 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -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) -- 2.25.1