提交 04ec8364 编写于 作者: C Chen Wandun 提交者: Yang Yingliang

filemap: dont shrink_page_cache in add_to_page_cache

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: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 76569c77
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册