mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes
Subsystems (2)
PATCH 1/1 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.
--- mm/hugetlb_vmemmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/hugetlb_vmemmap.c +1 -2
@@ -325,8 +325,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
Signature · 1 line
2.17.1
Quoted 8 lines · Yuan Can
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_THISNODEto help avoid fragmentation.
BTW: it is not a fatal error, so there is no need to backport.
Quoted 4 lines
Suggested-by Mike Kravetz <[email protected]>Suggested-by Muchun Song <[email protected]>Signed-off-by Yuan Can <[email protected]>
Thanks.
Quoted 11 lines · Yuan Can
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_THISNODEto help avoid fragmentation.Suggested-by Mike Kravetz <[email protected]>Suggested-by Muchun Song <[email protected]>Signed-off-by Yuan Can <[email protected]>--- mm/hugetlb_vmemmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks,
Signature · 1 line
Mike Kravetz
Quoted 18 lines
mm/hugetlb_vmemmap.c +1
-2@@ -325,8 +325,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 Signature · 1 line
2.17.1