提交 63051041 编写于 作者: Z Zhou Guanghui 提交者: Yang Yingliang

Ascend/cdm:alloc hugepage from the specified CDM node

ascend inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4D63I
CVE: NA

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

commit(bd177f8f0548f): Only __GFP_THISNODE marked allocations
will come from the CDM node.

Therefore, when we alloc normal hugepages, if __GFP_THISNODE
is marked, hugepages can be applied for from the specified nid.
Signed-off-by: NZhou Guanghui <zhouguanghui1@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4f02e8f3
......@@ -925,7 +925,8 @@ static struct page *dequeue_huge_page_nodemask(struct hstate *h, gfp_t gfp_mask,
bool mbind_cdmnode = false;
#ifdef CONFIG_COHERENT_DEVICE
if (is_cdm_node(nid) && mpol != NULL && mpol->mode == MPOL_BIND)
if (is_cdm_node(nid) && ((mpol != NULL && mpol->mode == MPOL_BIND) ||
(gfp_mask & __GFP_THISNODE)))
mbind_cdmnode = true;
#endif
zonelist = node_zonelist(nid, gfp_mask);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册