Unverified Commit 10c9fe8d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!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: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 3442b8cf 61e43f49
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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