From: Ma Wupeng mawupeng1@huawei.com
Commit b27abaccf8e8 ("mm/mempolicy: add MPOL_PREFERRED_MANY for multiple preferred nodes") add MPOL_PREFERRED_MANY which will return -1 if page node id is not in nodes. However this is useful for linux-v5.15 since commit 269fbe72cded ("mm/mempolicy: use unified 'nodes' for bind/interleave/prefer policies") already unify bind/prefer policies. While this patch does not exists during backport. To fix this, drop checking v.nodes for prefer.
Ma Wupeng (1): mm/mempolicy: check preferred_node rather than nodes for MPOL_PREFERRED
mm/mempolicy.c | 2 -- 1 file changed, 2 deletions(-)
From: Ma Wupeng mawupeng1@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8O41A
--------------------------------
Commit b27abaccf8e8 ("mm/mempolicy: add MPOL_PREFERRED_MANY for multiple preferred nodes") add MPOL_PREFERRED_MANY which will return -1 if page node id is not in nodes. However this is useful for linux-v5.15 since commit 269fbe72cded ("mm/mempolicy: use unified 'nodes' for bind/interleave/prefer policies") already unify bind/prefer policies. While this patch does not exists during backport. To fix this, drop checking v.nodes for prefer.
Fixes: 52e5df72c58e ("mm/mempolicy: add MPOL_PREFERRED_MANY for multiple preferred nodes") Signed-off-by: Ma Wupeng mawupeng1@huawei.com --- mm/mempolicy.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 659c6f0d146e..c99a5843429a 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2701,8 +2701,6 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long break;
case MPOL_PREFERRED: - if (node_isset(curnid, pol->v.nodes)) - goto out; polnid = pol->v.preferred_node; break;
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3376 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/T...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3376 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/T...