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

mm: fix missing reclaim of low-reliable page cache

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

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

Low-reliable memory is located in ZONE_MOVABLE, so gfp
should contain GFP_HIGHMEM and GFP_MOVABLE when reclaim
memory.
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 5ff32058
...@@ -4042,8 +4042,8 @@ unsigned long shrink_page_cache(gfp_t mask) ...@@ -4042,8 +4042,8 @@ unsigned long shrink_page_cache(gfp_t mask)
{ {
unsigned long nr_pages; unsigned long nr_pages;
/* We reclaim the highmem zone too, it is useful for 32bit arch */ /* reclaim from movable zone */
nr_pages = __shrink_page_cache(mask | __GFP_HIGHMEM); nr_pages = __shrink_page_cache(mask | __GFP_HIGHMEM | __GFP_MOVABLE);
return nr_pages; return nr_pages;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册