未验证 提交 10c9fe8d 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!1515 Fix CDM node problems

Merge Pull Request from: @ci-robot 
 
PR sync from: Zhang Zekun <zhangzekun11@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/HUXQSPZIXCAFEIF76HH4ELUNOET33ILO/ 
Fix problem introduced by feature CDM node, which might
alloc memory from other no cdm nodes.

Zhou Guanghui (2):
  mm: fix ignore cpuset enforcement
  mm: fix alloc CDM node memory for MPOL_BIND


-- 
2.17.1
 
https://gitee.com/openeuler/kernel/issues/I612UG 
 
Link:https://gitee.com/openeuler/kernel/pulls/1515 

Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> 
Reviewed-by: Weilong Chen <chenweilong@huawei.com> 
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
......@@ -3873,7 +3873,8 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
(alloc_flags & ALLOC_CPUSET) &&
!__cpuset_zone_allowed(zone, gfp_mask)
#ifdef CONFIG_COHERENT_DEVICE
&& !(alloc_flags & ALLOC_CDM)
&& (!is_cdm_node(zone->zone_pgdat->node_id) ||
!(alloc_flags & ALLOC_CDM))
#endif
)
continue;
......@@ -4946,7 +4947,8 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order,
ac->migratetype = gfp_migratetype(gfp_mask);
#ifdef CONFIG_COHERENT_DEVICE
if (cpusets_enabled() && !(*alloc_gfp & __GFP_THISNODE)) {
if (cpusets_enabled() &&
(!(*alloc_gfp & __GFP_THISNODE) || !is_cdm_node(preferred_nid))) {
#else
if (cpusets_enabled()) {
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册