mm: hugetlb_vmemmap: avoid allocation failure message in alloc_vmemmap_page_list()
Subsystems (2)
PATCH 1/1 mm: hugetlb_vmemmap: avoid allocation failure message in alloc_vmemmap_page_list()
When vmemmap pages allocation failed, the hugetlb pages fail to free, which is not an fatel error, so avoid the allocation failure report by passing __GFP_NOWARN in gfp_mask.
--- mm/hugetlb_vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/hugetlb_vmemmap.c +1 -1
@@ -386,7 +386,7 @@ static int vmemmap_remap_free(unsigned long start, unsigned long end,static int alloc_vmemmap_page_list (unsigned long start,unsigned long end,struct list_head *list) { -gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL; +gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN;unsigned long nr_pages = (end - start) >>PAGE_SHIFT ;int nid =page_to_nid ((struct page *)start);struct page *page, *next;
Signature · 1 line
2.17.1
Muchun Song
maintainerQuoted 7 lines · Yuan Can
When vmemmap pages allocation failed, the hugetlb pages fail to free, which is not an fatel error, so avoid the allocation failure report by passing
__GFP_NOWARNingfp_mask.
You have misunderstand me and Mike. We mean the memory allocation in vmemmap_remap_free() which also use __GFP_THISNODE, it has the same issue as you fixed in another thread. But the failure of memory allocation is not fetal. And it is better to remove __GFP_THISNODE as well.
Thanks.
Quoted 24 lines
Suggested-by Mike Kravetz <[email protected]>Suggested-by Muchun Song <[email protected]>Signed-off-by Yuan Can <[email protected]>---
mm/hugetlb_vmemmap.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)mm/hugetlb_vmemmap.c +1
-1@@ -386,7 +386,7 @@ static int vmemmap_remap_free(unsigned long start, unsigned long end,static int alloc_vmemmap_page_list (unsigned long start,unsigned long end,struct list_head *list) { -gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL; +gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN;unsigned long nr_pages = (end - start) >>PAGE_SHIFT ;int nid =page_to_nid ((struct page *)start);struct page *page, *next;Signature · 1 line
2.17.1
Quoted 6 lines · Muchun Song
Quoted 6 lines · Yuan Can
When vmemmap pages allocation failed, the hugetlb pages fail to free, which is not an fatel error, so avoid the allocation failure report by passing
__GFP_NOWARNingfp_mask.
Quoted 7 lines
You have misunderstand me and Mike. We mean the memory allocation in
vmemmap_remap_free()which also use__GFP_THISNODE, it has the same issue as you fixed in another thread. But the failure of memory allocation is not fetal. And it is better to remove__GFP_THISNODEas well.Thanks.
Ok, sorry about this, I will send another patch to remove __GFP_THISNODE in
vmemmap_remap_free, and I would like to know is it ok to add __GFP_NOWARN in
alloc_vmemmap_page_list()?
Thanks.
Quoted 23 lines
Quoted 23 lines
Suggested-by Mike Kravetz<[email protected]>Suggested-by Muchun Song<[email protected]>Signed-off-by Yuan Can<[email protected]>---
mm/hugetlb_vmemmap.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)mm/hugetlb_vmemmap.c +1
-1@@ -386,7 +386,7 @@ static int vmemmap_remap_free(unsigned long start, unsigned long end,static int alloc_vmemmap_page_list (unsigned long start,unsigned long end,struct list_head *list) { -gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL; +gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN;unsigned long nr_pages = (end - start) >>PAGE_SHIFT ;int nid =page_to_nid ((struct page *)start);struct page *page, *next;Signature · 1 line
2.17.1
Signature · 2 lines
Best regards, Yuan Can
Muchun Song
maintainerQuoted 20 lines · Yuan Can
Quoted 14 lines · Muchun Song
Quoted 8 lines · Yuan Can
When vmemmap pages allocation failed, the hugetlb pages fail to free, which is not an fatel error, so avoid the allocation failure report by passing
__GFP_NOWARNingfp_mask.You have misunderstand me and Mike. We mean the memory allocation in
vmemmap_remap_free()which also use__GFP_THISNODE, it has the same issue as you fixed in another thread. But the failure of memory allocation is not fetal. And it is better to remove__GFP_THISNODEas well.
Quoted 5 lines
Quoted 2 lines
Thanks.
Ok, sorry about this, I will send another patch to remove
__GFP_THISNODEinvmemmap_remap_free, and I would like to know is it ok to add__GFP_NOWARNinalloc_vmemmap_page_list()?
Do not do this. We need a warning here.
Thanks.
Quoted 33 lines
Thanks.
Quoted 26 lines
Quoted 25 lines
Suggested-by Mike Kravetz <[email protected]>Suggested-by Muchun Song <[email protected]>Signed-off-by Yuan Can <[email protected]>---
mm/hugetlb_vmemmap.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)mm/hugetlb_vmemmap.c +1
-1@@ -386,7 +386,7 @@ static int vmemmap_remap_free(unsigned long start, unsigned long end,static int alloc_vmemmap_page_list (unsigned long start,unsigned long end,struct list_head *list) { -gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL; +gfp_t gfp_mask =GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN;unsigned long nr_pages = (end - start) >>PAGE_SHIFT ;int nid =page_to_nid ((struct page *)start);struct page *page, *next;Signature · 1 line
2.17.1Signature · 2 lines
Best regards, Yuan Can
Quoted 18 lines · Muchun Song
Quoted 18 lines · Yuan Can
Quoted 13 lines · Muchun Song
Quoted 7 lines · Yuan Can
When vmemmap pages allocation failed, the hugetlb pages fail to free, which is not an fatel error, so avoid the allocation failure report by passing
__GFP_NOWARNingfp_mask.You have misunderstand me and Mike. We mean the memory allocation in
vmemmap_remap_free()which also use__GFP_THISNODE, it has the same issue as you fixed in another thread. But the failure of memory allocation is not fetal. And it is better to remove__GFP_THISNODEas well.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Thanks.
Ok, sorry about this, I will send another patch to remove
__GFP_THISNODEinvmemmap_remap_free, and I would like to know is it ok to add__GFP_NOWARNinalloc_vmemmap_page_list()?Do not do this. We need a warning here.
Thanks.
Ok, thanks for the reply.
Signature · 2 lines
Best regards, Yuan Can