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

mm: make page cache use reliable memory by default

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

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

__page_cache_alloc is used to alloc page cache in most file system,
such as ext4, f2fs, so add ___GFP_RELIABILITY flag to support feature
CONFIG_MEMORY_RELIABLE when alloc page.
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 fc2c1dc8
......@@ -249,6 +249,7 @@ extern struct page *__page_cache_alloc(gfp_t gfp);
#else
static inline struct page *__page_cache_alloc(gfp_t gfp)
{
gfp |= ___GFP_RELIABILITY;
return alloc_pages(gfp, 0);
}
#endif
......
......@@ -1042,6 +1042,7 @@ struct page *__page_cache_alloc(gfp_t gfp)
int n;
struct page *page;
gfp |= ___GFP_RELIABILITY;
if (cpuset_do_page_mem_spread()) {
unsigned int cpuset_mems_cookie;
do {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册