* [PATCH] mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes
@ 2023-09-06 9:31 Yuan Can
2023-09-07 6:37 ` Muchun Song
2023-09-07 20:31 ` Mike Kravetz
0 siblings, 2 replies; 3+ messages in thread
From: Yuan Can @ 2023-09-06 9:31 UTC (permalink / raw)
To: mike.kravetz, muchun.song, akpm, linux-mm; +Cc: wangkefeng.wang, yuancan
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.
Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
Suggested-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Yuan Can <yuancan@huawei.com>
---
mm/hugetlb_vmemmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
index c2007ef5e9b0..27fc65b8e37e 100644
--- a/mm/hugetlb_vmemmap.c
+++ b/mm/hugetlb_vmemmap.c
@@ -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
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes
2023-09-06 9:31 [PATCH] mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes Yuan Can
@ 2023-09-07 6:37 ` Muchun Song
2023-09-07 20:31 ` Mike Kravetz
1 sibling, 0 replies; 3+ messages in thread
From: Muchun Song @ 2023-09-07 6:37 UTC (permalink / raw)
To: Yuan Can; +Cc: Mike Kravetz, Andrew Morton, linux-mm, wangkefeng.wang
> On Sep 6, 2023, at 17:31, Yuan Can <yuancan@huawei.com> wrote:
>
> 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.
BTW: it is not a fatal error, so there is no need to backport.
>
> Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
> Suggested-by: Muchun Song <songmuchun@bytedance.com>
> Signed-off-by: Yuan Can <yuancan@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes
2023-09-06 9:31 [PATCH] mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes Yuan Can
2023-09-07 6:37 ` Muchun Song
@ 2023-09-07 20:31 ` Mike Kravetz
1 sibling, 0 replies; 3+ messages in thread
From: Mike Kravetz @ 2023-09-07 20:31 UTC (permalink / raw)
To: Yuan Can; +Cc: muchun.song, akpm, linux-mm, wangkefeng.wang
On 09/06/23 17:31, Yuan Can wrote:
> 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.
>
> Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
> Suggested-by: Muchun Song <songmuchun@bytedance.com>
> Signed-off-by: Yuan Can <yuancan@huawei.com>
> ---
> mm/hugetlb_vmemmap.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks,
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
>
> diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
> index c2007ef5e9b0..27fc65b8e37e 100644
> --- a/mm/hugetlb_vmemmap.c
> +++ b/mm/hugetlb_vmemmap.c
> @@ -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
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-07 20:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-06 9:31 [PATCH] mm: hugetlb_vmemmap: allow alloc vmemmap pages fallback to other nodes Yuan Can
2023-09-07 6:37 ` Muchun Song
2023-09-07 20:31 ` Mike Kravetz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox