mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
hugetlb: show nr_huge_pages in report_hugepages()
The number of pre-allocated huge pages should be nr_huge_pages, not free_huge_pages, although they are same during booting stage Link: https://lkml.kernel.org/r/20250515114231.65824-1-xuwenjie04@baidu.com Signed-off-by: Wenjie Xu <xuwenjie04@baidu.com> Signed-off-by: Li RongQing <lirongqing@baidu.com> Acked-by: Oscar Salvador <osalvador@suse.de> Cc: Muchun Song <muchun.song@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -3733,7 +3733,7 @@ static void __init report_hugepages(void)
|
|||||||
|
|
||||||
string_get_size(huge_page_size(h), 1, STRING_UNITS_2, buf, 32);
|
string_get_size(huge_page_size(h), 1, STRING_UNITS_2, buf, 32);
|
||||||
pr_info("HugeTLB: registered %s page size, pre-allocated %ld pages\n",
|
pr_info("HugeTLB: registered %s page size, pre-allocated %ld pages\n",
|
||||||
buf, h->free_huge_pages);
|
buf, h->nr_huge_pages);
|
||||||
if (nrinvalid)
|
if (nrinvalid)
|
||||||
pr_info("HugeTLB: %s page size: %lu invalid page%s discarded\n",
|
pr_info("HugeTLB: %s page size: %lu invalid page%s discarded\n",
|
||||||
buf, nrinvalid, nrinvalid > 1 ? "s" : "");
|
buf, nrinvalid, nrinvalid > 1 ? "s" : "");
|
||||||
|
|||||||
Reference in New Issue
Block a user