
From: Chen Wandun <chenwandun@huawei.com> hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- The reason of disable shrink_page_cache in add_to_page_cache are: 1. Synchronous memory reclamation will affect performance. 2. add_to_page_cache will not increase the number of LRU size in HugeTLB situation, so shrink_page_cache will not be triggered. Now, add_to_page_cache in mm/filemap.c and include/linux/pagemap.h are same, don't delete add_to_page_cache in mm/filemap.c, just keep interface for KABI. 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/filemap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 320c97244e163..2827e2b670e02 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -991,8 +991,6 @@ int add_to_page_cache(struct page *page, { int error; - if (vm_cache_limit_mbytes && page_cache_over_limit()) - shrink_page_cache(gfp_mask); __SetPageLocked(page); error = add_to_page_cache_locked(page, mapping, offset, gfp_mask); if (unlikely(error)) -- 2.25.1