Commit 6a898c27 authored by Yuan Can's avatar Yuan Can Committed by Andrew Morton

mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes

In vmemmap_remap_free(), a new head vmemmap page is allocated to avoid
breaking a contiguous block of struct page memory, however, the allocation
can always fail when the given node is movable node.  Remove the
__GFP_THISNODE to help avoid fragmentation.

Link: https://lkml.kernel.org/r/20230906093157.9737-1-yuancan@huawei.comSigned-off-by: default avatarYuan Can <yuancan@huawei.com>
Suggested-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
Suggested-by: default avatarMuchun Song <songmuchun@bytedance.com>
Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 7fa38d0e
......@@ -320,8 +320,7 @@ static int vmemmap_remap_free(unsigned long start, unsigned long end,
.vmemmap_pages = &vmemmap_pages,
};
int nid = page_to_nid((struct page *)start);
gfp_t gfp_mask = GFP_KERNEL | __GFP_THISNODE | __GFP_NORETRY |
__GFP_NOWARN;
gfp_t gfp_mask = GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN;
/*
* Allocate a new head vmemmap page to avoid breaking a contiguous
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment