提交 12a799d0 编写于 作者: C Chen Wandun 提交者: Zheng Zengkai

mm/hugetlb: suppress wrong warning info when alloc gigantic page

stable inclusion
from stable-5.10.20
commit c9ea7719a4afc43bade6d5e9a953dd7618aa5251
bugzilla: 50608

--------------------------------

[ Upstream commit 7ecc9565 ]

If hugetlb_cma is enabled, it will skip boot time allocation when
allocating gigantic page, that doesn't means allocation failure, so
suppress this warning info.

Link: https://lkml.kernel.org/r/20210219123909.13130-1-chenwandun@huawei.com
Fixes: cf11e85f ("mm: hugetlb: optionally allocate gigantic hugepages using cma")
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NMike Kravetz <mike.kravetz@oracle.com>
Cc: Roman Gushchin <guro@fb.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 6b710995
...@@ -2517,7 +2517,7 @@ static void __init hugetlb_hstate_alloc_pages(struct hstate *h) ...@@ -2517,7 +2517,7 @@ static void __init hugetlb_hstate_alloc_pages(struct hstate *h)
if (hstate_is_gigantic(h)) { if (hstate_is_gigantic(h)) {
if (hugetlb_cma_size) { if (hugetlb_cma_size) {
pr_warn_once("HugeTLB: hugetlb_cma is enabled, skip boot time allocation\n"); pr_warn_once("HugeTLB: hugetlb_cma is enabled, skip boot time allocation\n");
break; goto free;
} }
if (!alloc_bootmem_huge_page(h)) if (!alloc_bootmem_huge_page(h))
break; break;
...@@ -2535,7 +2535,7 @@ static void __init hugetlb_hstate_alloc_pages(struct hstate *h) ...@@ -2535,7 +2535,7 @@ static void __init hugetlb_hstate_alloc_pages(struct hstate *h)
h->max_huge_pages, buf, i); h->max_huge_pages, buf, i);
h->max_huge_pages = i; h->max_huge_pages = i;
} }
free:
kfree(node_alloc_noretry); kfree(node_alloc_noretry);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册